Opencv how to fix xfeatures2d error in .lib file

2019-08-21 02:10发布

I am trying to use opencv's feature matcher so I download opencv's extra modules and moved the xfeatures2d.hpp file into include/opencv2 but when ever I try to run Local Windows Debuger I get two errors this: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: static struct cv::Ptr __cdecl cv::xfeatures2d::SURF::create(double,int,int,bool,bool)" (?create@SURF@xfeatures2d@cv@@SA?AU?$Ptr@VSURF@xfeatures2d@cv@@@3@NHH_N0@Z) referenced in function main TheRealFlannBasedMatcher C:\Users\Jacks\source\repos\TheRealFlannBasedMatcher\TheRealFlannBasedMatcher\TheRealFlannBasedMatcher.obj 1

and this error: Severity Code Description Project File Line Suppression State Error LNK1120 1 unresolved externals TheRealFlannBasedMatcher C:\Users\Jacks\source\repos\TheRealFlannBasedMatcher\x64\Debug\TheRealFlannBasedMatcher.exe 1

so I went through my included header files one at a time and the problem goes away way I comment out #include "opencv2/xfeatures2d.hpp" but a whole new slew of problems pop up with the stuff that was relieing on it. so I did some digging online and I think that the problem lies with my linked opencv_world400d.lib file please help.

0条回答
登录 后发表回答