LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL Library not found or failed to load

Hello

 

I am trying to call a third party DLL from LabVIEW and finding this issue:

 

Call library function note .... Library not found or failed to load

_______

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.

 

I have checked with dumpbin that:

  • The DLL is 32-bit and so is my LabVIEW installation
  • The functions I am trying to load are exported and use C (cdecl) calling convention

I've tried with the wizard including the header file, and the directory containing the lib file, as well as the preprocessors directives that are usually included int he C examples.

 

This is a specific Modbus Client implementation with some "extra steps" so to speak, so I would like to get it to work through the dll rather than use the standard NI Modbus library.

 

I know that the LabVIEW error message isn't very specific, so if anyone has any insight of what could be going wrong here or how I can further troubleshoot the issue, it would be most appreciated.

 

Thank you

0 Kudos
Message 1 of 6
(7,249 Views)

Is it possible that this DLL has some other dependencies it can't find? Such as a runtime? I loaded it into Dependency Walker which exploded a bit but it seems like maybe something from Visual Studio?

Message 2 of 6
(7,218 Views)

Your DLL has two dependencies that could be a problem.

1) MSVCR100.dll: This is the C runtime library from Visual Studio 2010. Make sure you download the redistributable package for the Visual C runtime library 2010 and install it on your system.

2) JVM.dll: This is the Java virtual machine runtime library. Your DLL apparently was generated from some Java code and that requires the Java runtime engine (of a compatible version) to be present on your system and accessible for the LabVIEW process.

It means you need to install the Java JRE and probably add the path to the directory where the JVM.dll file is installed (something like <Program Files (x86)>\Java\jre<version>\bin\client) to your PATH environment variable.

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 6
(7,203 Views)

Thanks for the replies

 

1) Yes, the Visual C++ redist 2010 was installed already on the system. msvcr100.dll is in system32

2) That is correct. However, JRE was already installed, jvm.dll added to the path environment variable and displaying correctly with java -version on cmd

 

0 Kudos
Message 4 of 6
(7,193 Views)

@Pablo.Fernandez wrote:

Thanks for the replies

 

1) Yes, the Visual C++ redist 2010 was installed already on the system. msvcr100.dll is in system32


Do you use a 32 bit Windows system? Otherwise the right location for msvcr100.dll for 32 bit applications would be SysWOW64, meaning you need to install the 32 bit version of the MS Visual C runtime library.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 6
(7,174 Views)

Hi,

 

Yes, sorry for the late reply. I have a 64-bit machine but i have both the 32 bit and the 64 bit 2010 c++ redist installed, so they are both in system32 and in syswow64

0 Kudos
Message 6 of 6
(7,145 Views)