LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling DLL on LabVIEW for Linux

I have a vi that calls a dll made with Visual C++ on windows enviroment. What are the steps for calling this same dll on Linux ? Do we need to generate another dll?
0 Kudos
Message 1 of 5
(5,148 Views)
First, I don't know if LabVIEW for Linux can even call a DLL. I suspect that since this technology (as obsolete as it is, at least for an operating system - thank you Windows) has been adopted by Linux, that you can. I don't have my linux workstation on at the moment, but if you need to know, I can check.

As for the DLL itself, I suspect you will have MAJOR problems getting it to work right in Linux, and that you will almost definitely have to rebuild it with a Linux native compiler. It sounds like you have the source code, so it should be a matter of just porting it over, and stripping out all of the platform dependent calls and substituting all of the necessary function calls.

Good luck, and please keep us up to date on your progress. Not many of us
use Linux, and any and all information on the matter is gold.
0 Kudos
Message 2 of 5
(5,148 Views)
In Linux, shared libraries are called "shared object" files and end in a ".so" extension. You can use the gcc compiler to create one.

Check out the following link:

http://www-106.ibm.com/developerworks/linux/library/l-dll.html?dwzone=linux

Good luck,

Jim
0 Kudos
Message 3 of 5
(5,148 Views)
In article <506500000005000000D19C0000-1027480788000@exchange.ni.com>, Labviewguru wrote:

> First, I don't know if LabVIEW for Linux can even call a DLL. I
> suspect that since this technology (as obsolete as it is, at least for
> an operating system - thank you Windows) has been adopted by Linux,
> that you can. I don't have my linux workstation on at the moment, but
> if you need to know, I can check.
>
> As for the DLL itself, I suspect you will have MAJOR problems getting
> it to work right in Linux, and that you will almost definitely have to
> rebuild it with a Linux native compiler. It sounds like you have the
> source code, so it should be a matter of just porting it over, and
> stripping out all of the platform dependent calls a
nd substituting all
> of the necessary function calls.
>
> Good luck, and please keep us up to date on your progress. Not many
> of us use Linux, and any and all information on the matter is gold.

In linuxland isn't a dll called a shared library? You'd basically have to
get the source for the dll and beat on it until it turns into a shared lib
(better still, see if you can get an already built linux library). Actually
hooking into the library from within LV should work the same in either world.

NI, by the way, has app notes on this subject. I haven't gotten around to
reading any of them yet, though.

That's my story and I'm sticking with it.
0 Kudos
Message 4 of 5
(5,148 Views)
You will need to recompile this shared library under Linux, and use LabVIEW version specific to Linux. It will allow you to call .so files (shared libraries) in the same way you called .dll (dynamic link libraries) on Windows.

Zvezdana S.
National Instruments
0 Kudos
Message 5 of 5
(5,148 Views)