linking problem - missing references (Bug #804)
Description
Hi
I've downloaded opencv2.2.0 and I've compiled some of the new demo apps without problem (eg houghlines.cpp though you have to add the include for stdafx.h), but the SURF app mathcher_simple.cpp cannot resolve any of the cv:: object methods.
I think there is at least one lib missing in the instructions on creating a Visual Studio project. Could you post an updated list please ?
thanks
Brendan
Associated revisions
Merge pull request #804 from gpsinghsandhu:staticCast
History
Updated by brendan ruff about 14 years ago
.. and this is the linker errors in their full glory.
1>MainSURF.obj : error LNK2019: unresolved external symbol "void +cdecl cv::drawMatches(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > const &,class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > const &,class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > const &,class cv::Mat &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char> > const &,int)" (?drawMatches@cv@YAXABVMat@1@ABV?$vector@VKeyPoint@cv
@V?$allocator@VKeyPoint@cv@@std
@std
@01ABV?$vector@UDMatch@cv@V?$allocator@UDMatch@cv
@std
@4@AAV21@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std
@4@H@Z) referenced in function _main
@QBEXABVMat@2@0AAV?$vector@UDMatch@cv@
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: void +thiscall cv::DescriptorMatcher::match(class cv::Mat const &,class cv::Mat const &,class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > &,class cv::Mat const &)const " (?match@DescriptorMatcher@cvV?$allocator@UDMatch@cv
@std
@std
@0@Z) referenced in function _main
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: void +thiscall cv::DescriptorExtractor::compute(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > &,class cv::Mat &)const " (?compute@DescriptorExtractor@cv@QBEXABVMat@2@AAV?$vector@VKeyPoint@cv
@V?$allocator@VKeyPoint@cv@@std
@std
@AAV32@Z) referenced in function _main
@QAE@HH_N@Z) referenced in function _main
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: +thiscall cv::SurfDescriptorExtractor::SurfDescriptorExtractor(int,int,bool)" (??0SurfDescriptorExtractor@cv
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: void +thiscall cv::FeatureDetector::detect(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > &,class cv::Mat const &)const " (?detect@FeatureDetector@cv@QBEXABVMat@2@AAV?$vector@VKeyPoint@cv
@V?$allocator@VKeyPoint@cv@@std
@std
@0@Z) referenced in function _main
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: +thiscall cv::SurfFeatureDetector::SurfFeatureDetector(double,int,int)" (??0SurfFeatureDetector@cv@QAE@NHH@Z) referenced in function _main
@UAE@XZ) referenced in function "public: virtual +thiscall cv::SurfFeatureDetector::~SurfFeatureDetector(void)" (??1SurfFeatureDetector@cv@
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: virtual +thiscall cv::FeatureDetector::~FeatureDetector(void)" (??1FeatureDetector@cvUAE@XZ)
@UAE@XZ) referenced in function "public: virtual +thiscall cv::SurfDescriptorExtractor::~SurfDescriptorExtractor(void)" (??1SurfDescriptorExtractor@cv@
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: virtual +thiscall cv::DescriptorExtractor::~DescriptorExtractor(void)" (??1DescriptorExtractor@cvUAE@XZ)
@UAEXABV?$vector@VMat@cv@
1>MainSURF.obj : error LNK2001: unresolved external symbol "public: virtual void +thiscall cv::DescriptorMatcher::add(class std::vector<class cv::Mat,class std::allocator<class cv::Mat> > const &)" (?add@DescriptorMatcher@cvV?$allocator@VMat@cv
@std
@std
@Z)
@UAEXXZ)
1>MainSURF.obj : error LNK2001: unresolved external symbol "public: virtual void +thiscall cv::DescriptorMatcher::clear(void)" (?clear@DescriptorMatcher@cv
1>MainSURF.obj : error LNK2001: unresolved external symbol "public: virtual void +thiscall cv::DescriptorMatcher::train(void)" (?train@DescriptorMatcher@cv@UAEXXZ)
@UAEXABVFileNode@2@
1>MainSURF.obj : error LNK2001: unresolved external symbol "public: virtual void +thiscall cv::DescriptorMatcher::read(class cv::FileNode const &)" (?read@DescriptorMatcher@cvZ)
@UBEXAAVFileStorage@2@
1>MainSURF.obj : error LNK2001: unresolved external symbol "public: virtual void +thiscall cv::DescriptorMatcher::write(class cv::FileStorage &)const " (?write@DescriptorMatcher@cvZ)
?$BruteForceMatcher@U?$L2@M@cv@
1>MainSURF.obj : error LNK2001: unresolved external symbol "protected: virtual void +thiscall cv::BruteForceMatcher<struct cv::L2<float> >::knnMatchImpl(class cv::Mat const &,class std::vector<class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> >,class std::allocator<class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > > > &,int,class std::vector<class cv::Mat,class std::allocator<class cv::Mat> > const &,bool)" (?knnMatchImpl@cv
@MAEXABVMat@2@AAV?$vector@V?$vector@UDMatch@cv@V?$allocator@UDMatch@cv
@std
@std
@V?$allocator@V?$vector@UDMatch@cv@V?$allocator@UDMatch@cv
@std
@std
@2
@std@HABV?$vector@VMat@cv
@V?$allocator@VMat@cv@@std
@5@_N@Z)
?$BruteForceMatcher@U?$L2@M@cv@
1>MainSURF.obj : error LNK2001: unresolved external symbol "protected: virtual void +thiscall cv::BruteForceMatcher<struct cv::L2<float> >::radiusMatchImpl(class cv::Mat const &,class std::vector<class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> >,class std::allocator<class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > > > &,float,class std::vector<class cv::Mat,class std::allocator<class cv::Mat> > const &,bool)" (?radiusMatchImpl@cv
@MAEXABVMat@2@AAV?$vector@V?$vector@UDMatch@cv@V?$allocator@UDMatch@cv
@std
@std
@V?$allocator@V?$vector@UDMatch@cv@V?$allocator@UDMatch@cv
@std
@std
@2
@std@MABV?$vector@VMat@cv
@V?$allocator@VMat@cv@@std
@5@_N@Z)
@UAE@XZ) referenced in function "public: virtual +thiscall cv::BruteForceMatcher<struct cv::L2<float> >::~BruteForceMatcher<struct cv::L2<float> >(void)" (??1?$BruteForceMatcher@U?$L2@M@cv@
1>MainSURF.obj : error LNK2019: unresolved external symbol "public: virtual +thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@cv
@UAE@XZ)
Updated by brendan ruff about 14 years ago
OK I resolved it. The 2d features library opencv_features2d220d.lib is missing, as are a few others from the instructions. No biggy
- Status changed from Open to Done
- (deleted custom field) set to fixed