09-22-2015 12:52 PM
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.
Solved! Go to Solution.
09-23-2015 02:36 AM
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
09-23-2015 07:40 AM
Ok, thanks for the info. This is what I was afraid of.