Jump to content

Relinking to .so on windows


Recommended Posts

I have this external library that works on Windows and Linux, providing DLL for Windows and .so for Linux. I had to move files around a bit, and got a few broken dependencies as a result. I was able to relink all the DLL calls, but when I try to do the same for .so calls, the LabView complains that it cannot process the library. Is there any way to do this on Windows, or do I have to use LabView on Linux to do this?

Br, Mike

Edited by mike5
Link to comment

I have this external library that works on Windows and Linux, providing DLL for Windows and .so for Linux. I had to move files around a bit, and got a few broken dependencies as a result. I was able to relink all the DLL calls, but when I try to do the same for .so calls, the LabView complains that it cannot process the library. Is there any way to do this on Windows, or do I have to use LabView on Linux to do this?

Br, Mike

Make sure the .so file is in the same path as the .dll (so only the extension differ), and relink your calls to mydll.*, this should do the trick for Linux as well. Note that Linus is case-sensitive.

Ton

Link to comment

Make sure the .so file is in the same path as the .dll (so only the extension differ), and relink your calls to mydll.*, this should do the trick for Linux as well. Note that Linus is case-sensitive.

Ton

So, in the "Conditional disable" I relink the "Linux" case to the dll, and I am done? How about the calling convention? Windows or C? I guess C, but I want to be sure.

Thanks and best regards, Mike

Link to comment

So, in the "Conditional disable" I relink the "Linux" case to the dll, and I am done? How about the calling convention? Windows or C? I guess C, but I want to be sure.

Thanks and best regards, Mike

I'm not sure about the calling convention, but you don't need a linux specific case. Look at the NI DAQmx VIs where they are linked to daqmx.* On each platform LabVIEW selects which file to load.

Ton

Link to comment

So, in the "Conditional disable" I relink the "Linux" case to the dll, and I am done? How about the calling convention? Windows or C? I guess C, but I want to be sure.

Thanks and best regards, Mike

No Ton already mentioned it although didn't say so specifically. For the libraryname you enter <name>.* and make sure that the .DLL and .so are in the same directory on the respective platform (they can be both present on both platforms but don't need to be). Then LabVIEW will replace the * at the end with whatever prefered shared library extension for that platform and load the resulting library.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.