visual studio/eclipse : error LNK2019: unresolved external symbol [...] referenced in function main
I have a problem : error LNK2019: unresolved external symbol [...] referenced in function main
#include <opencv2/highgui/highgui.hpp>
using namespace std;
using namespace cv;
int main(int argc, char * const argv[])
{
cvNamedWindow("P2", CV_WINDOW_AUTOSIZE);
//path to image ex : c:/Users/image.jpg
CvCapture* capture = cvCreateFileCapture("path to image");
IplImage* frame;
while (1) {
frame = cvQueryFrame(capture);
if (!frame) break; cvShowImage("P2", frame); char c = cvWaitKey(0); if (c == 27) break;
}
cvReleaseCapture(&capture); cvDestroyWindow("P2");
return 0;
}
I start my project by following tutorial, the same configuration to use OpenCV with visual Studio and Eclipse but I have the same error.
is that really the exact error message ?
you forgot to link opencv libs, which opencv version are you using ?
where did you find that code ? it's horribly outdated, and must not be used.
I use the last version of OpenCV on visual studio 2010. I have a problem with link opencv libs (example : I added opencv_ts300d.lib, error : LINK : fatal error LNK1104: cannot open file 'opencv_ts300d.lib') so I don't add link.
The folder path : C:\opencv\build\include ? How do I know I use the correct confuguration (x64/x86) and the correct compiler version ?