LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run shared library for linux RT target in Windows labVIEW?

Hello. everybody.

I am using cRIO-9042 with Linux Realtime OS.
I'm working on embedding a VI with a shared library.

I'm having trouble with this process, please let me know what I'm doing wrong.

I have a dll file, a so file, and a header file, and I made a library call function node using them.
At this time, the desired function was created using the header file, and the library name was specified as <library name.*>, and the dll and so files were located in the cRIO/home/lvuser path.
After building and deploying vi containing this library call function to cRIO, I connected a monitor and rebooted to see if it was run.

"Missing external fucntion library name.*:cnc_startupprocess:C in VI NC_PC_Test_Library.vi." message is displayed on the monitor and it is not executed.

What is the problem in this case? p
lease answer about my question.

Thank you very much. 

 

0 Kudos
Message 1 of 7
(2,039 Views)

Do you mean to say that your DLL and so are both called "library name.dll" and "library name.so"? Or did you go through the problem of editing the error message to hide what secretive DLL you are using?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 7
(2,023 Views)

Thank you Rolf.

 

I didn't understand the question correctly, but it's not meant to hide the dll.

I just want to know how to use shared library in cRIo.

 

Thank you

0 Kudos
Message 3 of 7
(1,979 Views)

Hello Rolf, Thanks for your reply.

 

I didn't understand the question correctly, but I don't mean to hide the dll. I want to distribute shared library files on cRIO.

 

Do I have to do something called "ldconfig"? If you need this, please tell me how to do it in detail.

 

 

0 Kudos
Message 4 of 7
(2,007 Views)

In your first message you quote the error message

 

Missing external fucntion library name.*:cnc_startupprocess:C in VI NC_PC_Test_Library.vi

Aside from the typo you made in function, it states library name.* in there.


If tyou didn’t edit that message to hide the library name of your shared library, you better make sure that your shared library really is called “library name.so”

 

Of course you could also change the library name in the Call Library Node configuration to match the actual name of your library.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 7
(1,997 Views)

Hello.

The real message is,

"Missing external fucntion Focas_dll_for_LabVIEW_4.*:cnc_startupprocess:C in VI StartupProcess.lvlib:NC_PC_Test_Library.vi."

 

Is there anything wrong with the name?

 

Thank you.

 

0 Kudos
Message 6 of 7
(1,967 Views)

@DMT_AMTT wrote:

Hello.

The real message is,

"Missing external fucntion Focas_dll_for_LabVIEW_4.*:cnc_startupprocess:C in VI StartupProcess.lvlib:NC_PC_Test_Library.vi."

 

Is there anything wrong with the name?

 

Thank you.

No there isn’t unless your shared library isn’t called Focas_dll_for_LabVIEW_4.so.

Also note that the uppercase an lowercase do matter under Linux, not like Windows which doesn’t care about that.

 

The dll doesn’t do anything on the cRIO, so you don’t need to copy it, only the  .so can be used by the Linux system.

 

As to where to put it, I’m not sure /home/lvuser is included in your ld search path. I usually put the libraries in /usr/local/lib and just to be sure run ldconfig, checking the /etc/ld.so.cache file afterwards to contain the library path. However automatic recognition of your library by ldconfig may be impossible because your library doesn’t follow the Linux naming scheme lib*.so*.


If you prepend the lib to your shared library and use the library name without lib in the Call Library Node it should still work as LabVIEW on Linux retries with prepended lib to the library name if the loading failed the first time.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 7
(1,948 Views)