LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview error in calling DLL: Library not found

Hi!

 

I have been following this tutorial:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1OvCAI&l=en-PK

which is an example of how to build a dll file using visual studio and call that dll in labview. An Example project is also provided in this link.

I downloaded the example project, created a new MSVS2019 DLL project, replaced the filers and compiled it successfully (window 10). DLL is generated successfully.  I further followed the tutorial on how to call this DLL in labview i.e. via Call Function Library.

But labview gives the following error:

 

sig1998_0-1622212380850.png

 

But if I use the DLL provided by the NI, in the example project, it works fine.....

 

Note: I am using MSVS2019 and This tutorial is using MSVS2010. Can this be the issue?

Also I am using Labview 2019 32-bit.

 

Thanks in Advance

0 Kudos
Message 1 of 5
(1,193 Views)

What are the settings for your project?

Are you creating a debug build of your DLL?

Do you try try to load your DLL on the same computer that you used to build your DLL?

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 5
(1,189 Views)

What are the settings for your project?

I am using MSVS 2019, with solution configuration set to 'Debug' and solution platform set to 'x86'.

 

Are you creating a debug build of your DLL?

Yes I am using Debug Build for my DLL....

 

Do you try try to load your DLL on the same computer that you used to build your DLL?

Yes I am using a different computer for building DLL. The DLL file is for use on another computer.

0 Kudos
Message 3 of 5
(1,130 Views)

One more observation, the DLL that is provided by the NI is 253kb in size, whereas the DLL that I create using MSVS flow takes only 38kb memory. Can this be the reason that something is missing in my DLL? And also the error suggests the same thing, library not found....

0 Kudos
Message 4 of 5
(1,125 Views)

The size is likely because you compile with DLL Debug Runtime while NI had Static Release Runtime.

 

Static means that the C Runtime library is included in the DLL. The DLL selection means fhat you have to install the according MS C Runtime library on the target computer too. But there exists no Redistributable Debug C Runtime Library from Microsoft. The only way to get that on a computer is by installing Visual C legally.

 

A Debug build without a working debugger and access to the sources is pretty useless anyhow!

 

So if you want to use your DLL on a different computer than where you compile it you should select a release build and decide if you want it larger but not requiring the Redistributable C Runtime install, or smaller but requiring the installation of the C Runtime on every target computer!

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(1,117 Views)