LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to use a library file (.dll created on a 32-bit platform) on a 64-bit platform?

Getting a "Library not found or failed to load" error when trying to run a program. The details for all errors reads "The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path."

 

When you click on show error, the function call is highlighted in the block diagram. When you right click it and click on configure, then search for the specific library where that function comes from, and assign the function call to that library, you get the following error: "The library selected is not valid for the current platform. For example, you are running 64-bit LabVIEW and the library might be a 32-bit library."

 

Is there a way to somehow convert the 32-bit library to 64-bit, or perhaps wrap it so that it's compatible on a 64-bit platform?

0 Kudos
Message 1 of 4
(4,730 Views)

You have to recompile the DLL with a compiler running on a 64-bit OS on a 64-bit machine. That's assuming, of course, there are no programmatic changes that are required to deal with 64-bit numbers.

 

I'm also assuming, of course, that you're using a library that was created for the same operating system that you're trying to use. Such as not trying to use a 16-bit DLL?

 

You might also be running into issues with dependencies on other libraries.

Message 2 of 4
(4,720 Views)

I'm trying to use a DLL from WinRadio to control one of their radios with LabVIEW, but I'm using Windows 7 64-bit and LabView is giving me the 32-bit error.  I have Visual Basic on the same machine and the example program uses the same DLL and builds the application, so it did not make sense why LabVIEW could not.  I tried to use the wildcard (*) option on the Call Library Function Node, but it does not like it that way either.  This is quite cumbersome if I have to always get my vendors to recompile for each OS version.  Anyone else seen this situation where one tool can use the DLL while the other cannot?

 

I attached a zip file with the LV VI, DLL and the VB project, if anyone is curious.

0 Kudos
Message 3 of 4
(4,634 Views)

Yes, I saw this exact issue with the Fieldpoint dll (so NI's own systems). It's there in MAX (which is still a 32-bit program) but missing in LabVIEW (the 64-bit program). It's worth checking the type of your VB - it may be running in the emulator itself, which is why it's fine.

 

There is no easy answer to this. Either the dlls need to be recompiled, you need to stick to 32-bit LabVIEW or you need to convince your vendors to use COM interactions via the dlls rather then direct calls. (A colleagues has had no issues with the dlls he's using, as the COM wrapper allows them to run via the emulator and still be called via a 64-bit application whlst not being altered themselves). I'm afraid my knowledge there is limited to that hand-wavy level of explanation. I know one of my colleagues talked about writing a wrapper - but that would be quite involved, and would need to exist for every possible function in the dll. It's not an easy option...Sorry to not be of any real help, but you are not alone in struggling with this kind of thing. But there is a chance you can get your vendors to recompile to 64-bit, there's no sign of when (or if) NI are going to actually update the fieldpoint one.

Message 4 of 4
(4,624 Views)