Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to load shared library on cRIO-9030

Hello community,

 

I have compiled a shared library "mylibrary.so" for my Linux-based cRIO system by using g++ compiler. This library provides c code to the cRIO that than execute by using Call Library Node.

 

So far I have done following steps:

1) FTP "mylibrary.so" to /home/lvuser/mylibrary.so

2) SSH to cRIO by using PuTTY 

3) Copy the file to /usr/local/lib by using command cp   /home/lvuser/mylibrary.so   /usr/local/lib from the terminal

4) Enabling file access by using chmod 0755 /usr/local/lib/mylibrary.so 

5) Create a softlink to shared library by using ln   -sf   /usr/local/lib/mylibrary.so   /usr/local/lib/mylibrary.so.1

6) Run ldconfig

 

But when I check shared library cache on cRIO by ldconfig -p, the library does not show up. In further my terminal does not recognize the command -Wl and -soname.

 

If anyone knows how to overcome this problem, it would be a great help.

 

0 Kudos
Message 1 of 2
(1,957 Views)

Hey Harry,

 

            Actually, I believe that you should have compiled your library for your specific target before moving and calling it there. There are some target settings you need to apply for your compiler.  NI has some very nice articles witch contain both the supported C/C++ IDEs with compilers as well as detailed instructions on how to apply target specific configurations for the NI-Linux RT embedded platforms. I would recommend for you to check the following:

 

    1 . Integrating C Code with LabVIEW on NI Linux Real-Time Targets

    2. Getting Started with C/C++ Development Tools for NI Linux Real-Time, Eclipse Edition

 

I hope this helps,

Sincerely yours,

Denis

0 Kudos
Message 2 of 2
(1,852 Views)