voglio compilare un OpenCV Console programma C++ in Visual Studio 2013. Questo è il mio codice:"Il programma non può iniziare perché opencv_world300.dll manca dal computer" Errore in C++
#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;
}
Anche se io ho definito tutte le directory nelle proprietà sia nelle directory Computer sia in Visual Studio, ottengo l'errore "The program can't start because opencv_world300.dll is missing from your computer."
.
Come posso risolvere questo problema?
Grazie
Se si dispone della dll in questione, la cosa più semplice da fare è copiare e incollare nella cartella di output eseguibile dei progetti –
Ho notato che questa dll non è posizionata con altre DLL. Hai bisogno di trovare la cartella in cui si trova 'opencv_world300.dll'. È tutto. – CroCo