LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Exe doesn't search data for dependencies

Solved!
Go to solution

Hello all,

 

I am developing a LabVIEW 2011 executable, which calls several dlls. When I build the exe the dlls are moved to the data folder within the Executable folder. When I started the exe before labview used to look for the dlls in the data folder automatically.

 

This week I did a build and now it gives me a prompt, that it can't find the dlls, starting with the KEYLIB32.dll. When I navigate to the folder it can find the other depencies without any problems, but I would like to avoid a prompt opening for my customer. This Issue happens on both my development machine and the deployment machine.

What can I try to go back to the way it was before?

 

thanks in advance for your input.

 

Edit: I should mention that I changed nothing major in my software when the problem first occured, except for making a few more front panels open when called in their VI properties.



Remember Cunningham's Law
0 Kudos
Message 1 of 8
(4,008 Views)

Did you put the DLLs in the Always Included section of the Source Files in the Build Spec?  I needed to do this ...

 

Bob Schor

0 Kudos
Message 2 of 8
(3,950 Views)

Thanks for your answer Bob!

I can't do that easily, because e.g. the KEYLIB32.dll is only in the dependencies.

 

I located the files on disk, added them to the project and added them to the always included section. The exe still can't find them. Last year, it worked and I don't know what I did that changed the behaviour.



Remember Cunningham's Law
0 Kudos
Message 3 of 8
(3,930 Views)
Solution
Accepted by topic author PeterFoerster

Hi Peter,

 

how are you?

Can you post your project or at least a reduced part of your project where I could see the behaviour for myself? You can write me an private message in case you dont want to post the code publicly.

 

BTW: Have you read this article?:

Why Can't My Stand-Alone Executable Find My DLL Even Though I Have Specified the Path for the DLL?
http://digital.ni.com/public.nsf/websearch/862567530005f09c862565c50068363d?OpenDocument

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
Message 4 of 8
(3,916 Views)

Just in Case anyone is looking for a solution here:

 

Working with Christoph we managed to cure the symptoms by putting the Dlls into the same directory as the .exe. Now it finds them upon startup.

 

We haven't been able to work out the reason for this, especially the "it has been working before" part, but we won't pursue the issue any longer, since it works with our workaround.

 

Thanks Christoph!



Remember Cunningham's Law
0 Kudos
Message 5 of 8
(3,870 Views)

I had this a couple of weeks ago, and even stranger, it worked on 3/4 computers, but the 4th just wouldn't find anything. I put the DLL in the data folder, exe folder and system 32 and none of it worked. In the end we send it back to IT for reinstallation and then it worked ... strange as duck.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 8
(3,866 Views)

Hi Yamaeda,

 

Peter and I worked on this issue via email, so he could send me his application. As it turned out the DLLs could be found easily if the previously not automatically found DLLs are placed in the same directory as the EXE or (in this case) in the instr.lib subdirectory. We didnt dive into that deeper, since I only had the application to work with and would have needed access to the source code. Peter was happy with my statement so I didnt look deeper in the issue.

 

Best regards,

Christoph

Staff Applications Engineer
National Instruments
Certified LabVIEW Developer (CLD), Certified LabVIEW Embedded Systems Developer (CLED)


Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved
0 Kudos
Message 7 of 8
(3,855 Views)

I had a case# for this issue in an earlier iteration. When i got this missing DLL (VC++ 2015) i just changed it and recompiled the program. It landed in /data as the old one, but didn't work. In this case i got it to work be changing the compile to place the DLL in the .exe folder, manually placing it there didn't work, i assume it still tried to link to the other path. That's what you also did.

The strange thing this time, was that that solution didn't work. Well it worked on 75% of the computers ... lovely to debug.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(3,836 Views)