OpenCV - DLL missing, but it's not?

后端 未结 14 804
陌清茗
陌清茗 2020-12-04 17:50

I am trying just a basic program with OpenCV with the following code:

#include \"cv.h\"
#include \"highgui.h\"

int main()
{
    IplImage* newImg;
    newImg         


        
相关标签:
14条回答
  • 2020-12-04 18:17

    just open the bin folder and copy and paste the .dll files to the folder you are working in..it should fix the problem

    0 讨论(0)
  • 2020-12-04 18:20

    Just add C:\OpenCV2.0\bin into your PATH environment variable

    or

    When you install OpenCV,

    Choose the option, Add OpenCV to the system PATH for current user which is not default one

    0 讨论(0)
  • 2020-12-04 18:21

    I followed instructions on http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010 but was still stuck on exactly the same problem, so here's how I resolved it.

    1. Fetched MSVC 2010 express edition.

    2. Fetched Win 32 OpenCV 2.2 binaries and installed in default location.

    3. Created new project.

    4. Project setup

      Project -> OpenCV_Helloworld Properties...Configuration Properties -> VC++ Directories

      Include Directories... add: C:\OpenCV2.2\include\;

      Library Directories... add: C:\OpenCV2.2\lib;C:\OpenCV2.2\bin;

      Source Directories... add:

      C:\OpenCV2.2\modules\calib3d\src;C:\OpenCV2.2\modules\contrib\src;C:\OpenCV2.2\modules\core\src;C:\OpenCV2.2\modules\features2d\src;C:\OpenCV2.2\modules\flann\src;C:\OpenCV2.2\modules\gpu\src;C:\OpenCV2.2\modules\gpu\src;C:\OpenCV2.2\modules\highgui\src;C:\OpenCV2.2\modules\imgproc\src;C:\OpenCV2.2\modules\legacy\src;C:\OpenCV2.2\modules\ml\src;C:\OpenCV2.2\modules\objdetect\src;C:\OpenCV2.2\modules\video\src;
      

      Linker -> Input -> Additional Dependencies...

      For Debug Builds... add:

      opencv_calib3d220d.lib;opencv_contrib220d.lib;opencv_core220d.lib;opencv_features2d220d.lib;opencv_ffmpeg220d.lib;opencv_flann220d.lib;opencv_gpu220d.lib;opencv_highgui220d.lib;opencv_imgproc220d.lib;opencv_legacy220d.lib;opencv_ml220d.lib;opencv_objdetect220d.lib;opencv_video220d.lib;
      

    At this point I thought I was done, but ran into the problem you described when running the exe in debug mode. The final step is obvious once you see it, select:

    Linker -> General ... Set 'Use Library Dependency Inputs' to 'Yes'

    Hope this helps.

    0 讨论(0)
  • 2020-12-04 18:22

    you can find the opencv_core248 and other dlls in opencv\build\x86\vc12\bin folder. Just copy the dlls you require into system32 folder. And your app should start working in a flash ! Hope it helps.

    0 讨论(0)
  • 2020-12-04 18:24

    You just need to add the folder of the needed dll file (or files) to your system "Environment Variables" in "Path". Your problem will 100% be resolved. I had this problem too.

    0 讨论(0)
  • 2020-12-04 18:25

    Copy all .dll from /bin in System32

    0 讨论(0)
提交回复
热议问题