LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[LV2017]DLL build form VS2012 can't not work on WIN10, but WIN7 can work.

Solved!
Go to solution

Hi,

 

I have some problem for dll on Labview.

I build the dll by visual studio 2012, and use on LV2017. (Develop with Win7.)

On Win7, that can work normally.

So I build program to application and try execute on Win10.

But I change to Win10 execute, that will occur below error:

 

1. Missing external function error.

And I checked the DLL file (Win32Project1.dll is my build dll.) and related file whether is put on correct location.

I also try to move the dll file to Application folder, but got same result...

jackieBB_0-1620310158116.png

Application folder:

jackieBB_1-1620310235799.png

data folder:

jackieBB_2-1620310243373.png

 

I can't find any solution, so I install LabVIEW2017 on Win10, and try to build this program work.

 

Found error when I use the Call library function node:

jackieBB_3-1620310642717.png

I think maybe the path of my DLL file is from a network disk or the path is too long, so I tried again after changing it, but the result is still the same, the same error is displayed.

 

And I found "Function Page" has an option "Specify path on diagram", so I try to choose it and this error disappear!

jackieBB_5-1620311082662.png

And I try to run program, but...

jackieBB_6-1620311124929.png

 

When I made the DLL, I compiled it into a 64-bit version, and it can be used normally in Win7 (64-bit), so I am not sure if I need to set other things to use it on Win10?

Or should I use the new version of Visual studio to make DLL so that I can directly avoid compatibility issues @@?

 

If have any comment please free feel tell me, thank you!!!

 

Note:

1. I have installed LabVIEW2017 run-time, Visual C++ 2012.

2. Other Official dll (ex:FTDI CHIP ftd2xx.dll) can work on win10/Win7.

0 Kudos
Message 1 of 6
(2,115 Views)

You need to install the Redistributable Visual Studio 2012 C Runtime Library 64-bit installer on every computer you want to be able to use your 64-bit Visual C 2012 dll.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 6
(2,067 Views)

Thanks your reply!

I installed Visual Studio 2012 C++ Runtime Library 64-bit and 32-bit installer on my computer, but still occur this error message.

jackieBB_0-1620352009814.png

 

0 Kudos
Message 3 of 6
(2,051 Views)
Solution
Accepted by topic author jackieBB

Looks like you still have missing dependencies. From MSVS Runtime point of view may be you have compiled Debug Version, but on the target machine you have only release runtime installed. Try to compile release instead of debug in this case. Another suggestion - probably you calling other DLL inside of yours and this is what missing on Win10. You can try to open your DLL with Dependency Walker (https://dependencywalker.com) and check what missing on the target PC (comparing with Win7), or you can check your application with Process Explorer (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) and see the list of the loaded DLLs. Another method is to run Process Monitor (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon), then open VI - all attempts to load external code will be logged and you will see what exactly missing. Usually these three tools are sufficient for troubleshooting (with Runtime as well)

Message 4 of 6
(2,035 Views)

Thank you!

I modified to use released mode to compiler, and use the generated DLL to execute, that can operate normally.

But I have not yet determined the cause of the missing External function.

0 Kudos
Message 5 of 6
(1,962 Views)

The Debug Version of the Microsoft C Runtime library is only available on computers on which you have also the according Microsoft Visual C development environment installed. There is no redistributable installer for the Debug version and Microsoft specifically restricts the right to install this version of the C Runtime to only computers that have the Visual C IDE installed (of course a legal version of it).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 6
(1,885 Views)