03-08-2006 01:27 AM
03-08-2006 01:59 PM
What do you mean with the .so was create with C++ for LabVIEW 6.0? Do you mean you created the shared library with gcc and you could interface to it from LabVIEW 6 with the Call Library Node while you can't interface the same shared lib from LabVIEW 7.1 anymore?
@Mordred wrote:I am running a subVI file using Labview 7.1 under Linux Mandriva operating system. I tried calling a library function with a .so extension but the error 'Function not found in library' was up.The .so function that was called, was initially built using C++ for Labview 6.0. Could the change of Labview versions be the cause of the problem or what is? What do I need to do? Urgently need help, thanks.
03-29-2006 12:59 AM
@rolfk wrote:
What do you mean with the .so was create with C++ for LabVIEW 6.0? Do you mean you created the shared library with gcc and you could interface to it from LabVIEW 6 with the Call Library Node while you can't interface the same shared lib from LabVIEW 7.1 anymore?
Exactly. I was baffled when such a thing happened. Previously on LabVIEW 6.0 and on another Linux version(I am not sure which), everything was running completely fine. Anyway I was not the one who created the shared library and interfaced it with LabVIEW 6.
Now on LabVIEW 7.1, this problem came up.
It couldn't be due to the C++ name decorations, could it? Because if it can previously run on LabVIEW 6.0 involving the same C++ files, how come not on LabVIEW 7.1? Please suggest some reasons for this.
Another issue might be that the shared library was created on an old system and links to some libc and other libraries that provided symbols that changed or got discontinued in the version installed by your Mandriva distribution. Initialization of the shared library at link time might then fail and LabVIEW only sees that it could not link to a specific symbol. It does not know if the symbol is really not there or if the dlsym() function failed because the link operation failed.
03-29-2006 03:45 AM
If this is the problem recompiling the shared library with the gcc development toolchain installed on your new Linux system should help.
@Mordred wrote:
Another issue might be that the shared library was created on an old system and links to some libc and other libraries that provided symbols that changed or got discontinued in the version installed by your Mandriva distribution. Initialization of the shared library at link time might then fail and LabVIEW only sees that it could not link to a specific symbol. It does not know if the symbol is really not there or if the dlsym() function failed because the link operation failed.
What can I do if this is the cause of the problem? Should I still go about doing the C++ files or something else? Please advise me.
03-29-2006 11:25 AM
03-29-2006 12:59 PM - edited 03-29-2006 12:59 PM
I haven't done anything with KDevelop. What I usually do for the simple shared libraries I use is to modify an existing makefile to create the library for me. If you have the source code of the shared library it comes likely with a more or less ready Makefile. Otherwise you might need to run gcc directly from the command line but it depends a bit on the gcc versions you have. I have really no idea about Mandriva in any version so you will have to dig in there a bit.
@Mordred wrote:
I am using Linux Mandriva 2005. It has something called KDevelop.
Could you give me a rundown on how recompiling a shared library can be done? Do I need to use Makefile, and/or a specifically compatible gcc compiler in which LabVIEW supports?
Message Edited by rolfk on 03-29-2006 08:16 PM
03-30-2006 11:50 AM
03-30-2006 12:59 PM
A shared library created in LabVIEW is quite a bit different than one created from C source files. I have only experience with LabVIEW shared libraries under Windows and am not even sure if the LabVIEW for Linux version can create them too.
@Mordred wrote:
Thanks. I also realised that it is possible to build shared libraries(.dll for Windows, not sure for Linux) from LabVIEW's tools itself. In addition, I found the g++ program which consists simply of two boxes and a command line. Is this the program that is used to create a shared library with .so extension for Linux?
For some reasons, I was unable to locate the Makefile for the .cpp files. Is this because the shared libraries were created using LabVIEW and not gcc or g++? Is this possible?
Also, when a shared library for Linux is created(whether using LabVIEW or gcc), does it automatically generate a Makefile file?
04-20-2006 11:19 PM
04-27-2006 09:21 PM