Ask Your Question

Revision history [back]

opencv 3.1.0 unresolved external

I just installed the opencv 3.1.0 version on my Win PC and tried to run it with Visual Studio 2010. When I compile my first bit of code I get 2 linker errors:

"unresolved externel void__cdecl cv::fastFree(void *)" 
"public: void__thiscall cv::Mat::deallocate(void).

My main code:

#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/core.hpp"
#include <opencv\cv.h>
#include "opencv/highgui.h"
#include "opencv2/core/mat.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main (int argc, const char * argv[])
{
 printf("Hello world, cv version: %s", CV_VERSION);
 Mat img; // = imread("TD.img", CV_LOAD_IMAGE_UNCHANGED);
 return 0;
}

The word "Mat" is not highlighted as it should be. Without the Mat line the program works fine.

Because the program compiles I think I got the include pathes right and the compiler doesnt complain about the *.libs, so they are found. I have linked the opencv_world310.lib.

What have I missed to get the things right? Thank you in advance.