Search code examples
visual-c++dllvisual-studio-2005visual-studio-debugging

Tell Visual C++ where to look for DLLs


I can set global search directories for headers and libraries in VC++ Tools->Options->Projects and Solutions.

But what about DLLs? Can I do this through VC++ itself which would be preferable?


Solution

  • It is not VC++ which will search for dlls but it is your application which will search for dlls. Here is how it works

    Your application search for the dll in the following folder system - system32 - windows - folder specified in path - application directory

    If the dll is not found on any of these locations, it will raise an error.

    To resolve this, you can always specify the exact path of dll in the application itself. Refer to this link http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx for further explanation.