http://stackoverflow.com/questions/31711093/the-program-cant-start-because-opencv-world300-dll-is-missing-from-your-comput

 

 

위 링크의 제일 마지막의 조언처럼 C:\WINDOWS\system32에다가 dll파일들을 복사하니 된다. 이때, visual studio 2015(v14)를 이용하더라도 v12의 dll을 복사하니 되었다.

 

 

 

 

--------------------------------------------------------------------

I want compile an opencv Console C++ program in Visual Studio 2013. This is my code:

#include "stdafx.h"
#include "opencv2/highgui/highgui.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, const char** argv)
{
    Mat img = imread("rgb_1.png", CV_LOAD_IMAGE_UNCHANGED); //read the image data in the file "MyPic.JPG" and store it in 'img'

    if (img.empty()) //check whether the image is loaded or not
    {
        cout << "Error : Image cannot be loaded..!!" << endl;
        //system("pause"); //wait for a key press
        return -1;
    }

    namedWindow("MyWindow", CV_WINDOW_AUTOSIZE); //create a window with the name "MyWindow"
    imshow("MyWindow", img); //display the image which is stored in the 'img' in the "MyWindow" window

    waitKey(0); //wait infinite time for a keypress

    destroyWindow("MyWindow"); //destroy the window with the name, "MyWindow"

    return 0;
}

Although I have defined all the directories in properties both in Computer and Visual Studio directories, I get "The program can't start because opencv_world300.dll is missing from your computer."error.

How can I fix this problem?

Thanks

shareimprove this question
1  
If you have the dll in question, the easiest thing to do is copy and paste it into your projects executable output folder – James Pack Jul 29 '15 at 21:08
    
I've noticed this dll is not placed with other dlls. You need to find out the folder in whichopencv_world300.dll is located. That's all. – CroCo Jul 29 '15 at 23:38

Under windows you can copy it from:

<your install directory>\opencv30\build\x64\vc12\bin

And put it in your Visual Studio solution (I assume you are using a x64/Release configuration):

<your solution directory>\x64\Release

Or you you can add the above OpenCV to your PATH environment variable

shareimprove this answer
    
It works and this is great, but I can't figure out why it worked flawlessy before <an unknown action of mine> without the present hack. – Patrizio Bertoni Dec 2 '15 at 14:36

If this question is still relevant, I figured out the way.

I presume you used the tutorial on the OpenCV website to setup OpenCV. Once you run the command prompt and execute the command, it creates the environment variable for OpenCVbut it does not add it in the path. So if you go to the path and add the location of the bin in vc12 (vc14 for me), save it, and restart visual studio, it works.

shareimprove this answer

You can check your system variable to confirm the directory in which opencv_world300.dll is located (maybe C:\opencv\build\x64\vc12\bin) is present.

If it exists but the problem still is not solved, try to put all .dll files in the directory to C:\WINDOWS\system32

Posted by uniqueone
,