I am a beginner learning OpenCV. I have the latest version (2.4.7.2 as of Dec, 2013) and am trying a simple code to load image. The code is OK, but when I compiled and then run
As a tip make sure the last three digits in your linker contain the same numbers as your actual dll files. Ex: version 3.2.0 should be written 320.dll and so on
You are running into OpenCV dll issues, similar to here. Three ways to fix dll
-related issues about OpenCV, also works for other dll related issues.
copy the required dlls into the same folder with your application. This is a little better because it kind of prepares you for when you'll need to deploy your application on systems that don't have OpenCV installed (for then don't forget to build the release version of your application).
add the dll path to Debugging Environment
: Project –> Properties –> Configuration Properties –> Debugging –> Environment –> add dlls' paths here. The syntax is NAME=VALUE and macros can be used (for example, $(OutDir).
For example, to prepend C:\Windows\Temp to the PATH: PATH=C:\WINDOWS\Temp;%PATH%
Similarly, to append $(SolutionDir)\DLLS to the PATH: PATH=%PATH%;$(SolutionDir)\DLLS
add the dll path to Environment Variables
(be careful that the path in there are separated by ;
)
EDIT: Among the three methods, the first two will only work for this project (local) and the last one works for all projects in your PC (global).
i have problem . i have win7-64bit and visual studio 2013 and opencv-3
the program can't start because opencv_word300d.dll is missing from your computer . try reinstalling the program to fix problem.
Make sure your environment variables are set properly (i.e., Path
should have ../opencv/bin/
) and then use these lines in your CMakeList file to generate the appropriate project files.
FIND_PACKAGE( OpenCV REQUIRED )
TARGET_LINK_LIBRARIES( myProject ${OpenCV_LIBS} )