Connor Mote
Connor Mote

Reputation: 225

System error - "the code cannot proceed because .dll was not found."

I'm getting this error when I try to run my app:

error

I checked and there is no reason that I can see that it wouldn't be able to find libnlopt-0.dll. Here it is (note GlassModelCalcualator is the DLL that uses libnlopt-0.dll), in the GlassModelCalcualatorDLL folder:

image

and in the debug folder of GlassModelCalcualatorDLL:

image

I have a different program that has a console which uses GlassModelCalcualator.dll and that also has this issue. To fix that, I had to put libnlopt-0.dll in the Debug folder of GlassModelCalcualator.

I'm assuming this is not the same problem here since you can clearly see that libnlopt-0.dll is in GlassModelCalcualator's Debug folder.

Any ideas?

Upvotes: 1

Views: 7066

Answers (1)

solarflare
solarflare

Reputation: 441

Windows will follow a hierarchical order when searching for dll's.

You could place your dll in the same directory as the exe or even in the Windows system folders (only if you're absolutely sure you want to keep this dll forever as there's no cleanup)

https://msdn.microsoft.com/en-us/library/windows/desktop/ms682586(v=vs.85).aspx

Upvotes: 1

Related Questions