I Can't Compile My C/C++ Code onto My Real-Time Target Using Eclipse

Updated Apr 2, 2019

Reported In

Hardware

  • cRIO-9082

Software

  • LabVIEW Real-Time Module

Operating System

  • PharLap

Programming Language

  • C
  • C++

Issue Details

I am following the Getting Started with C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition tutorial but I am receiving this error when trying to compile onto my cRIO-9082:

c:/build/17.0/x64/sysroots/i686-nilrtsdk-mingw32/usr/bin/x86_64-nilrt-linux/../../libexec/x86_64-nilrt-linux/gcc/x86_64-nilrt-linux/4.9.2/ld.exe: cannot find crti.o: No such file or directory 
c:/build/17.0/x64/sysroots/i686-nilrtsdk-mingw32/usr/bin/x86_64-nilrt-linux/../../libexec/x86_64-nilrt-linux/gcc/x86_64-nilrt-linux/4.9.2/ld.exe: cannot find crtbeginS.o: No such file or directory 
c:/build/17.0/x64/sysroots/i686-nilrtsdk-mingw32/usr/bin/x86_64-nilrt-linux/../../libexec/x86_64-nilrt-linux/gcc/x86_64-nilrt-linux/4.9.2/ld.exe: hello.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC 

 

Solution

The error occurs as this tutorial can only be used specifically for Real-Time (RT) Targets running NI Linux Real-Time. In this case, the cRIO-9082 can only run the NI Phar Lap ETS and thus is not compatible with this tutorial. Older and legacy RT Targets do not support the use of NI Linux Real-Time.

To compile C code onto RT Targets running NI Phar Lap ETS National Instruments recommends you use CVI Real-Time for C-based shared libraries.

For C++, National Instruments strongly recommends using the MSVC 2009 or MSVC 2010 compilers.