LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a standalone for a project containing visual c DLL and finally run in a non labview and non visual c system

Solved!
Go to solution

I have built a project in labview that uses a DLL which was made in visual studio . When I run the vi in my system it works fine, when I build a standalone and again run in my system it works fine but when I install the same vi in a non labview and no visual studio systems it does not run, neither it shows any error. 
Can anyone tell the way to build an installer for a VI containing a DLL which was built in Visual c and finally run in a non labview and non visual studio system...

0 Kudos
Message 1 of 4
(2,067 Views)

You need to make sure that the Visual C runtime libraries for the version of your Visual Studio Development system are installed on the target system. Since Visual Studio 2015 Microsoft has created a single Visual C runtime library version which works for all Visual C versions between 2015 and the version it has itself.

And then you of course also have to make sure that you do not try to distribute the debug build of your DLL. A debug build DLL links to a different Visual C runtime library with extra instrumentation for debugging (such as memory trampolines around every single memory allocation and several more things) but there does not exist a redisttributale Debug C runtime library for this. And you are legally not allowed to install this runtime library on other computers than where the Visual C development system is installed as it is part of the Visual C development license.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,053 Views)
Solution
Accepted by topic author DIDIPREETY

Thank you for your reply.

The issue has been resolved. Actually in the target system  2 dll files were missing (vcruntime140d.dll and userd.dll), I just copied those 2 dlls and pasted in the System32 folder and finally it worked. 

0 Kudos
Message 3 of 4
(1,966 Views)

@DIDIPREETY wrote:

Thank you for your reply.

The issue has been resolved. Actually in the target system  2 dll files were missing (vcruntime140d.dll and userd.dll), I just copied those 2 dlls and pasted in the System32 folder and finally it worked. 


First, you should never copy dlls that you haven’t created yourself and know exactly what you are doing between computers!

For the Visual C Runtime there is a Microsoft sanctioned redistributable C Runtime Installer that you should use for each target system to which you want to distribute your application or dll.

Except: Second the d at the end of the filename indicates that you are distributing the Debug build of your dll which links to the debug version of the C Runtime. You are legally not allowed to use that version on other computers than the one on which you installed the Visual C IDE. Your Visual C license does not entitle you to distribute theses files in any way to other computers.

 

Build a Release version of your DLL and install the redistributable C Runtime Installer from Microsoft on every target machine!

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,958 Views)