OpenCV - missing dlls?

前端 未结 4 1102
灰色年华
灰色年华 2021-01-26 09:54

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

相关标签:
4条回答
  • 2021-01-26 10:18

    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

    0 讨论(0)
  • 2021-01-26 10:22

    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.

    1. 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).

    2. 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

    3. 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).

    0 讨论(0)
  • 2021-01-26 10:22

    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.

    0 讨论(0)
  • 2021-01-26 10:36

    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} )
    
    0 讨论(0)
提交回复
热议问题