Reputation: 11
i'm using opencv 2.44 , viusal studio c++ 2010 when i compliel i get this error
Error 1 error LNK2019: unresolved external symbol "public: __thiscall cv::SURF::SURF(void)" (??0SURF@cv@@QAE@XZ) referenced in function _main C:\Users\user\Desktop\proiect\prj\prj\sh1.obj prj
#include <opencv2\imgproc\imgproc_c.h>
#include <stdio.h>
#include <math.h>
#include <opencv\highgui.h>
#include <opencv\cv.h>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/nonfree/features2d.hpp>
using namespace cv;
void main(){
char i;
Mat image,img,ref;
ref=imread("hh.jpg");
// create window to show image
namedWindow("window", CV_WINDOW_AUTOSIZE);
namedWindow("costel", CV_WINDOW_AUTOSIZE);
namedWindow("fanel", CV_WINDOW_AUTOSIZE);
Mat ig,ib,ibb;
Mat bkg;
Mat prev;
Mat stor;
cvtColor(ref, ref, CV_BGR2GRAY);
FastFeatureDetector detector(15);
vector<KeyPoint> keypoints1;
detector.detect(ref, keypoints1);
SurfDescriptorExtractor extractor;
Mat descriptors1;
extractor.compute(ref, keypoints1, descriptors1);
....
Upvotes: 1
Views: 3132
Reputation: 1
Good luck. You are likely on a missing DLL myth, find opencv_nonfree244.dll , opencv_features2d244.dll and all other dll in your cv installation folder and copy them to the folder should fix it.
Upvotes: 0
Reputation: 692
it seems for me a problem in setting the project properties. properties->linker->input->additional dependencies in VS. May be you double check if you added opencv_features2d244.lib and opencv_nonfree244.lib
Upvotes: 1