LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

missing DLL, can't find path?

Solved!
Go to solution

I can't find this covered in the forums exactly.

 

I'm trying to attach a DLL to my project in a subfolder.  The whole project can be compiled/made without errors.  It's only when I attempt to build into Debug/Release that I get the error:

 

"the program can't start because XYZ.dll is missing"

 

If I simply relocate the DLL to the project root folder, then it runs.

 

I don't get it.  I've got the DLL attached to the project in the tree correctly.

0 Kudos
Message 1 of 3
(6,372 Views)
Solution
Accepted by topic author ElectroLund

Hello ElectroLund!

 

The behavior you are seing is due to the OSs standard mechanism for searching DLLs. When your application is loaded by the OS, it will first search for your DLL dependencies in the directory from which the desktop application is loaded. If it's not found in that location, Windows will try to search the DLL in the system directory. You can read more details on this and how you can change the behavior in the Windows Dev Center: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx#search_order_for_des...

 

Best regards!

- Johannes

0 Kudos
Message 2 of 3
(6,359 Views)

Ok, thanks for the info.  This is what I was afraid of.

0 Kudos
Message 3 of 3
(6,352 Views)