Search code examples
visual-studio-2010opencvbin

Visual Studio 2010 can't see /bin library of OpenCV


I'm trying to use OpenCv 2.2 in Visual Studio 2010.

I've configured everything by instruction: http://opencv.willowgarage.com/wiki/VisualC%2B%2B

and by instruction from the book:

So I've added all /lib and /include paths.

When I build project, it compiles and before starting app, VS displays an error message that opencv_core220d.dll is missing.

This file is in C:/OpenCV2.2/bin as all .dll files. If I add this file to my working directory - it will be fine. Then VS displays error about every .dll file that I added in Linker-Input configuration ( but with .lib extension ).

So, if I add all .dlls file that I've added as .lib in Linker configuration - to my working directory, project will start.

But why? Why VC doesn't see OpenCV2.2/bin folder? Where is this pointed?


Solution

  • Because it doesn't know to look there by default. However, it does know to check the current directory for the DLLs.

    You can tell it where to look by adding C:/OpenCV2.2/bin to your Path variable, or if you would rather not muck up your global Path you can set the Environment variable local to the C++ project.

    enter image description here

    I think that is the syntax for appending to the Path in VS2010, but I'm not sure, so Google it if that doesn't work :)