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.