我正在运行以下简单代码来定义BRIEF描述符:
#include "cv.h"
#include "opencv2\objdetect\objdetect.hpp"
#include "opencv2\core\core.hpp"
#include "opencv2\highgui\highgui.hpp"
#include "opencv2\calib3d\calib3d.hpp"
#include "opencv2\nonfree\nonfree.hpp"
#include "highgui.h"
#include "opencv2\features2d\features2d.hpp"
#pragma comment (lib, "opencv_core245d.lib")
#pragma comment (lib, "opencv_highgui245d.lib")
#pragma comment (lib, "opencv_imgproc245d.lib")
#pragma comment (lib, "opencv_video245d.lib")
#pragma comment (lib, "opencv_features2d245d.lib")
using namespace cv;
int main( int argc, char** argv )
{
BriefDescriptorExtractor Brief(32);
}
正如您所看到的,我已经在pragma中添加了lib,也在项目属性中添加了lib。以确保。
我收到以下链接器错误:
1>OIM2.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl cv::Algorithm::~Algorithm(void)" (??1Algorithm@cv@@UEAA@XZ) referenced in function "public: void __cdecl cv::BriefDescriptorExtractor::`vbase destructor'(void)" (??_DBriefDescriptorExtractor@cv@@QEAAXXZ)
1>OIM2.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl cv::DescriptorExtractor::~DescriptorExtractor(void)" (??1DescriptorExtractor@cv@@UEAA@XZ) referenced in function "public: virtual __cdecl cv::BriefDescriptorExtractor::~BriefDescriptorExtractor(void)" (??1BriefDescriptorExtractor@cv@@UEAA@XZ)
似乎认为“算法”的虚拟类不被识别,而且还有Brief描述符类。
有人可以指出如何解决这个问题?我真的很蠢,我真的可以帮忙。
谢谢,
吉尔。