Jump to content

Library calls in Linux?


Gary Rubin

Recommended Posts

I'm looking to transition a project from Windows to Linux. The Windows version uses Call Library Function Nodes to make calls to dll's associated with hardware drivers. Given that all of my hardware has Linux drivers available, do the calls to the drivers work pretty much the same way in the Labview Linux environment as in Windows?

Thanks,

Gary

Link to comment
I'm looking to transition a project from Windows to Linux. The Windows version uses Call Library Function Nodes to make calls to dll's associated with hardware drivers. Given that all of my hardware has Linux drivers available, do the calls to the drivers work pretty much the same way in the Labview Linux environment as in Windows?

Thanks,

Gary

That depends on whether the driver DLLs have the same interface on Linux as they do on Windows. If that is the case, then you should be alright. However, you will have to link to the .so files instead of the .dll files, unless you happened to have entered "dllname.*" as the shared library name, -- this allows LabVIEW to link to the platform specific shared library name when moved to another platform (assuming that the shared libraries have the same file name, minus the extension).

Link to comment
By that do you mean the same function names, parameters, etc.?

Also they need to use on both/all platforms the C decl calling convention. This is the only one that is supported on all platforms LabVIEW is available on. Sadly most 3rd party DLLs on Windows use Microsofts stdcall and then you will have to maintain two VI libraries anyhow.

If I write DLLs I always make sure they use cdecl. This has worked great for the OpenG LabVIEW ZIP Tools library which has one VI library and three shared libraries for the three OSes, Windows, Linux and Mac OSX.

Rolf Kalbermatter

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.