Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

image description

How can I solve it?

Regards!

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

image descriptionmain.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::IndexParams::~IndexParams(void)" (??1IndexParams@flann@cv@@QAE@XZ) referenced in function "public: __thiscall cv::flann::KDTreeIndexParams::~KDTreeIndexParams(void)" (??1KDTreeIndexParams@flann@cv@@QAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)" (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function "struct cv::Ptr<struct cv::flann::kdtreeindexparams=""> __cdecl cv::makePtr<struct cv::flann::kdtreeindexparams="">(void)" (??$makePtr@UKDTreeIndexParams@flann@cv@@@cv@@YA?AU?$Ptr@UKDTreeIndexParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::SearchParams::SearchParams(int,float,bool)" (??0SearchParams@flann@cv@@QAE@HM_N@Z) referenced in function "struct cv::Ptr<struct cv::flann::searchparams=""> __cdecl cv::makePtr<struct cv::flann::searchparams="">(void)" (??$makePtr@USearchParams@flann@cv@@@cv@@YA?AU?$Ptr@USearchParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > &,class cv::debug_build_guard::_InputArray const &)const " (?match@DescriptorMatcher@cv@@QBEXABV_InputArray@debug_build_guard@2@0AAV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@std@@0@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" (??1DescriptorCollection@DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(struct cv::Ptr<struct cv::flann::indexparams=""> const &,struct cv::Ptr<struct cv::flann::searchparams=""> const &)" (??0FlannBasedMatcher@cv@@QAE@ABU?$Ptr@UIndexParams@flann@cv@@@1@ABU?$Ptr@USearchParams@flann@cv@@@1@@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > const &,class cv::debug_build_guard::_InputOutputArray const &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char=""> > const &,int)" (?drawMatches@cv@@YAXABV_InputArray@debug_build_guard@1@ABV?$vector@VKeyPoint@cv@@V?$allocator@VKeyPoint@cv@@@std@@@std@@01ABV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@5@ABV_InputOutputArray@31@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std@@@5@H@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main

D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 9 unresolved externals

How can I solve it?

Regards!

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::IndexParams::~IndexParams(void)" (??1IndexParams@flann@cv@@QAE@XZ) referenced in function "public: __thiscall cv::flann::KDTreeIndexParams::~KDTreeIndexParams(void)" (??1KDTreeIndexParams@flann@cv@@QAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)" (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function "struct cv::Ptr<struct cv::flann::kdtreeindexparams=""> __cdecl cv::makePtr<struct cv::flann::kdtreeindexparams="">(void)" (??$makePtr@UKDTreeIndexParams@flann@cv@@@cv@@YA?AU?$Ptr@UKDTreeIndexParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::SearchParams::SearchParams(int,float,bool)" (??0SearchParams@flann@cv@@QAE@HM_N@Z) referenced in function "struct cv::Ptr<struct cv::flann::searchparams=""> __cdecl cv::makePtr<struct cv::flann::searchparams="">(void)" (??$makePtr@USearchParams@flann@cv@@@cv@@YA?AU?$Ptr@USearchParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > &,class cv::debug_build_guard::_InputArray const &)const " (?match@DescriptorMatcher@cv@@QBEXABV_InputArray@debug_build_guard@2@0AAV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@std@@0@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" (??1DescriptorCollection@DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(struct cv::Ptr<struct cv::flann::indexparams=""> const &,struct cv::Ptr<struct cv::flann::searchparams=""> const &)" (??0FlannBasedMatcher@cv@@QAE@ABU?$Ptr@UIndexParams@flann@cv@@@1@ABU?$Ptr@USearchParams@flann@cv@@@1@@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > const &,class cv::debug_build_guard::_InputOutputArray const &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char=""> > const &,int)" (?drawMatches@cv@@YAXABV_InputArray@debug_build_guard@1@ABV?$vector@VKeyPoint@cv@@V?$allocator@VKeyPoint@cv@@@std@@@std@@01ABV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@5@ABV_InputOutputArray@31@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std@@@5@H@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main

D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 9 unresolved externals

How can I solve it?

Regards!

UPDATE:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

Now build log looks like this:

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > &,class cv::debug_build_guard::_InputArray const &)const " (?match@DescriptorMatcher@cv@@QBEXABV_InputArray@debug_build_guard@2@0AAV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@std@@0@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" (??1DescriptorCollection@DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(struct cv::Ptr<struct cv::flann::indexparams=""> const &,struct cv::Ptr<struct cv::flann::searchparams=""> const &)" (??0FlannBasedMatcher@cv@@QAE@ABU?$Ptr@UIndexParams@flann@cv@@@1@ABU?$Ptr@USearchParams@flann@cv@@@1@@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > const &,class cv::debug_build_guard::_InputOutputArray const &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char=""> > const &,int)" (?drawMatches@cv@@YAXABV_InputArray@debug_build_guard@1@ABV?$vector@VKeyPoint@cv@@V?$allocator@VKeyPoint@cv@@@std@@@std@@01ABV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@5@ABV_InputOutputArray@31@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std@@@5@H@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main

D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 6 unresolved externals

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

How can I solve it?

Regards!

UPDATE1:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

UPDATE2:

I have added opencv_features2d331d.lib (I missed that there are 2 similar libs opencv_features2d331d.lib and *opencv_xfeatures2d331d.lib *) to Linker - Input - Additional Dependencies and its solved some more issues.

My current list of libs in Linker:

opencv_core331d.lib opencv_highgui331d.lib opencv_imgproc331d.lib opencv_imgcodecs331d.lib opencv_video331d.lib opencv_videoio331d.lib opencv_features2d331d.lib opencv_xfeatures2d331d.lib opencv_line_descriptor331d.lib opencv_flann331d.lib

Now build log looks like this:

log at pastebin

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::IndexParams::~IndexParams(void)" (??1IndexParams@flann@cv@@QAE@XZ) referenced in function "public: __thiscall cv::flann::KDTreeIndexParams::~KDTreeIndexParams(void)" (??1KDTreeIndexParams@flann@cv@@QAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)" (??0KDTreeIndexParams@flann@cv@@QAE@H@Z) referenced in function "struct cv::Ptr<struct cv::flann::kdtreeindexparams=""> __cdecl cv::makePtr<struct cv::flann::kdtreeindexparams="">(void)" (??$makePtr@UKDTreeIndexParams@flann@cv@@@cv@@YA?AU?$Ptr@UKDTreeIndexParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::flann::SearchParams::SearchParams(int,float,bool)" (??0SearchParams@flann@cv@@QAE@HM_N@Z) referenced in function "struct cv::Ptr<struct cv::flann::searchparams=""> __cdecl cv::makePtr<struct cv::flann::searchparams="">(void)" (??$makePtr@USearchParams@flann@cv@@@cv@@YA?AU?$Ptr@USearchParams@flann@cv@@@0@XZ)

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > &,class cv::debug_build_guard::_InputArray const &)const " (?match@DescriptorMatcher@cv@@QBEXABV_InputArray@debug_build_guard@2@0AAV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@std@@0@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" (??1DescriptorCollection@DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(struct cv::Ptr<struct cv::flann::indexparams=""> const &,struct cv::Ptr<struct cv::flann::searchparams=""> const &)" (??0FlannBasedMatcher@cv@@QAE@ABU?$Ptr@UIndexParams@flann@cv@@@1@ABU?$Ptr@USearchParams@flann@cv@@@1@@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > const &,class cv::debug_build_guard::_InputOutputArray const &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char=""> > const &,int)" (?drawMatches@cv@@YAXABV_InputArray@debug_build_guard@1@ABV?$vector@VKeyPoint@cv@@V?$allocator@VKeyPoint@cv@@@std@@@std@@01ABV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@5@ABV_InputOutputArray@31@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std@@@5@H@Z) referenced in function _main

data main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main

_main D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 9 1 unresolved externals

How can I solve it?

Regards!

UPDATE:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

Now build log looks like this:

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" (??1DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > &,class cv::debug_build_guard::_InputArray const &)const " (?match@DescriptorMatcher@cv@@QBEXABV_InputArray@debug_build_guard@2@0AAV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@std@@0@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" (??1DescriptorCollection@DescriptorMatcher@cv@@UAE@XZ) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" (??1FlannBasedMatcher@cv@@UAE@XZ)

main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(struct cv::Ptr<struct cv::flann::indexparams=""> const &,struct cv::Ptr<struct cv::flann::searchparams=""> const &)" (??0FlannBasedMatcher@cv@@QAE@ABU?$Ptr@UIndexParams@flann@cv@@@1@ABU?$Ptr@USearchParams@flann@cv@@@1@@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<class cv::keypoint,class="" std::allocator<class="" cv::keypoint=""> > const &,class std::vector<class cv::dmatch,class="" std::allocator<class="" cv::dmatch=""> > const &,class cv::debug_build_guard::_InputOutputArray const &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char=""> > const &,int)" (?drawMatches@cv@@YAXABV_InputArray@debug_build_guard@1@ABV?$vector@VKeyPoint@cv@@V?$allocator@VKeyPoint@cv@@@std@@@std@@01ABV?$vector@VDMatch@cv@@V?$allocator@VDMatch@cv@@@std@@@5@ABV_InputOutputArray@31@ABV?$Scalar_@N@1@4ABV?$vector@DV?$allocator@D@std@@@5@H@Z) referenced in function _main

main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main

D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 6 unresolved externals

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

How can I solve it?

Regards!

UPDATE1:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

UPDATE2:

I have added opencv_features2d331d.lib (I missed that there are 2 similar libs opencv_features2d331d.lib and *opencv_xfeatures2d331d.lib *opencv_xfeatures2d331d.lib) to Linker - Input - Additional Dependencies and its solved some more issues.

My current list of libs in Linker:

opencv_core331d.lib opencv_highgui331d.lib opencv_imgproc331d.lib opencv_imgcodecs331d.lib opencv_video331d.lib opencv_videoio331d.lib opencv_features2d331d.lib opencv_xfeatures2d331d.lib opencv_line_descriptor331d.lib opencv_flann331d.lib

Now build log looks like this:

log at pastebin

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 1 unresolved externals

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

How can I solve it?

Regards!

UPDATE1:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

UPDATE2:

I have added opencv_features2d331d.lib (I missed that there are 2 similar libs opencv_features2d331d.lib and opencv_xfeatures2d331d.lib) to Linker - Input - Additional Dependencies and its solved some more issues.

My current list of libs in Linker:

opencv_core331d.lib opencv_highgui331d.lib opencv_imgproc331d.lib opencv_imgcodecs331d.lib opencv_video331d.lib opencv_videoio331d.lib opencv_features2d331d.lib opencv_xfeatures2d331d.lib opencv_line_descriptor331d.lib

  1. opencv_core331d.lib
  2. opencv_highgui331d.lib
  3. opencv_imgproc331d.lib
  4. opencv_imgcodecs331d.lib
  5. opencv_video331d.lib
  6. opencv_videoio331d.lib
  7. opencv_features2d331d.lib
  8. opencv_xfeatures2d331d.lib
  9. opencv_line_descriptor331d.lib
  10. opencv_flann331d.lib

Now build log looks like this:

log at pastebin

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 1 unresolved externals

Errors during compiling tutorial (feature_homography)

Hi,

I have issues while compiling this tutorial code: tutorial_feature_homography

I'm using OpenCV 3.3.1 and Visual Studio 2017 (Windows 7 platform).

Compiler output:

log at pastebin

How can I solve it?

Regards!

UPDATE1:

I have added opencv_flann331d.lib to Linker - Input - Additional Dependencies and its solved issues with cv::flann.

UPDATE2:

I have added opencv_features2d331d.lib (I missed that there are 2 similar libs opencv_features2d331d.lib and opencv_xfeatures2d331d.lib) to Linker - Input - Additional Dependencies and its solved some more issues.

My current list of libs in Linker:

  1. opencv_core331d.lib
  2. opencv_highgui331d.lib
  3. opencv_imgproc331d.lib
  4. opencv_imgcodecs331d.lib
  5. opencv_video331d.lib
  6. opencv_videoio331d.lib
  7. opencv_features2d331d.lib
  8. opencv_xfeatures2d331d.lib
  9. opencv_line_descriptor331d.lib
  10. opencv_flann331d.lib

Now build log looks like this:

log at pastebin

main.cpp d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(76): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(77): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(78): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data data

d:\projects\video_recognition\videorecog\img_template_match01\img_template_match01\main.cpp(79): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data data

main.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl cv::findHomography(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,int,double,class cv::debug_build_guard::_OutputArray const &,int,double)" (?findHomography@cv@@YA?AVMat@1@ABV_InputArray@debug_build_guard@1@0HNABV_OutputArray@41@HN@Z) referenced in function _main _main

D:\Projects\video_recognition\VideoRecog\img_template_match01\Debug\img_template_match01.exe : fatal error LNK1120: 1 unresolved externals