tags:

views:

120

answers:

2

Hello. I have been working with OpenGL (SuperBible) and I just setup my environment (added the additional dependencies, etc.) and built my solution. When I try to execute it it says I am missing a dll. I solved the problem by moving the dll to my folder where the executable resides.

My question is why doesn't it look for it in my System32 folder? Why does it have to be in the folder with the executable. And finally is there a way to make it look for it in the System32 folder?

A: 

Check the value of your %PATH% environment variable.

set PATH

If system32 isn't in your path, thats why you can't find the dll.

As for why the DLL must be in the same folder, there are two possible culprits:

1) Your code has a Hard Coded Path to the Dll 2) The DLL isn't in any place that is listed in the %PATH% system variable.

Alan
Such an issue seems unlikely; there would certainly be more glaring issues if system32 was missing from the path variable.
Eric
A: 

IIRC there is something about registering DLLs. (Truth be told, I avoid DLLs whenever I can so I might be way off base.)

BCS