Compiling C Code Directly on NI LinuxRT Target

Updated Nov 30, 2022

Reported In

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

Programming Language

  • C

Issue Details

I want to compile C code on an NI Linux Real-Time (RT) machine target directly. Can I do this?

Solution

For a number of reasons such as saving space on embedded systems, NI does not install the header files for NI drivers and libraries on a real time target when the real-time driver is installed through the typical feeds.
To be able to compile correctly a developer will need to copy the header files from a host system (e.g. Linux desktop) to the NI Linux RT target. After copying these to the NI Linux RT system and installing a compiler, on-target compilation can be achieved.

Alternatively, NI Linux Real-Time Documentation and Tutorials provides a tutorial for cross-compilation or remote development extensions to be used with NI Linux Real-Time targets.