error LNK2019: unresolved external symbol 问题

原创 2012年05月12日 11:02:40
main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CvSVM::~CvSVM(void)" (??1CvSVM@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "int __cdecl cv::waitKey(int)" (?waitKey@cv@@YAHH@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::_InputArray const &)" (?imshow@cv@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV_InputArray@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "bool __cdecl cv::imwrite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::_InputArray const &,class std::vector<int,class std::allocator<int> > const &)" (?imwrite@cv@@YA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV_InputArray@1@ABV?$vector@HV?$allocator@H@std@@@3@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::_InputArray::_InputArray(class cv::Mat const &)" (??0_InputArray@cv@@QAE@ABVMat@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual float const * __thiscall CvSVM::get_support_vector(int)const " (?get_support_vector@CvSVM@@UBEPBMH@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual int __thiscall CvSVM::get_support_vector_count(void)const " (?get_support_vector_count@CvSVM@@UBEHXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::circle(class cv::Mat &,class cv::Point_<int>,int,class cv::Scalar_<double> const &,int,int,int)" (?circle@cv@@YAXAAVMat@1@V?$Point_@H@1@HABV?$Scalar_@N@1@HHH@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual float __thiscall CvSVM::predict(class cv::Mat const &,bool)const " (?predict@CvSVM@@UBEMABVMat@cv@@_N@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: virtual bool __thiscall CvSVM::train(class cv::Mat const &,class cv::Mat const &,class cv::Mat const &,class cv::Mat const &,struct CvSVMParams)" (?train@CvSVM@@UAE_NABVMat@cv@@000UCvSVMParams@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CvSVM::CvSVM(void)" (??0CvSVM@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CvSVMParams::CvSVMParams(void)" (??0CvSVMParams@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: static class cv::MatExpr __cdecl cv::Mat::zeros(int,int,int)" (?zeros@Mat@cv@@SA?AVMatExpr@2@HHH@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::copySize(class cv::Mat const &)" (?copySize@Mat@cv@@QAEXABV12@@Z) referenced in function "public: __thiscall cv::Mat::Mat(class cv::Mat const &)" (??0Mat@cv@@QAE@ABV01@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::Exception::~Exception(void)" (??1Exception@cv@@UAE@XZ) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" (??0Mat@cv@@QAE@HHHPAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::error(class cv::Exception const &)" (?error@cv@@YAXABVException@1@@Z) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" (??0Mat@cv@@QAE@HHHPAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::Exception::Exception(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0Exception@cv@@QAE@HABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" (??0Mat@cv@@QAE@HHHPAXI@Z)
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z) referenced in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::create(int,int const *,int)" (?create@Mat@cv@@QAEXHPBHH@Z) referenced in function "public: void __thiscall cv::Mat::create(int,int,int)" (?create@Mat@cv@@QAEXHHH@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::MatConstIterator::seek(int,bool)" (?seek@MatConstIterator@cv@@QAEXH_N@Z) referenced in function "public: class cv::MatConstIterator & __thiscall cv::MatConstIterator::operator++(void)" (??EMatConstIterator@cv@@QAEAAV01@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::convertTo(class cv::_OutputArray const &,int,double,double)const " (?convertTo@Mat@cv@@QBEXABV_OutputArray@2@HNN@Z) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" (??4?$Mat_@M@cv@@QAEAAV01@ABVMat@1@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::_OutputArray::_OutputArray(class cv::Mat &)" (??0_OutputArray@cv@@QAE@AAVMat@1@@Z) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" (??4?$Mat_@M@cv@@QAEAAV01@ABVMat@1@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: class cv::Mat __thiscall cv::Mat::reshape(int,int,int const *)const " (?reshape@Mat@cv@@QBE?AV12@HHPBH@Z) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" (??4?$Mat_@M@cv@@QAEAAV01@ABVMat@1@@Z)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::MatConstIterator::seek(int const *,bool)" (?seek@MatConstIterator@cv@@QAEXPBH_N@Z) referenced in function "public: __thiscall cv::MatConstIterator::MatConstIterator(class cv::Mat const *)" (??0MatConstIterator@cv@@QAE@PBVMat@1@@Z)
1>F:\MyProject\SVM\OpenCV\SVMexample\Debug\SVMexample.exe : fatal error LNK1120: 25 unresolved externals

原来在在Link里没有把以下的库包含进去。

opencv_core220d.lib
opencv_highgui220d.lib
opencv_video220d.lib
opencv_ml220d.lib
opencv_legacy220d.lib
opencv_imgproc220d.lib

版权声明:本文为博主原创文章,未经博主允许不得转载。

error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CQQFace::classC

在用VC做仿QQ面板的时候,加入了几个对话框类,应用RUNTIME_CLASS()时,编译时出现如下错误:error LNK2001: unresolved external symbol "publ...
  • BeyondHaven
  • BeyondHaven
  • 2010年11月30日 14:37
  • 8328

error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMe

用QWT绘制二维图像时,在examples文件下直接QtCreator打开pro运行无错的。 当我转到VS项目里就无法编译通过,原来是Qwt在pri文件里定义了一个 win32 {   ...
  • rongyong
  • rongyong
  • 2015年01月26日 14:06
  • 428

问题error LNK2001: unresolved external symbol "public: static class解决

错误提示: ...error LNK2001: unresolved external symbol "public: static class A obj...
  • ActionReaction
  • ActionReaction
  • 2014年07月21日 09:42
  • 881

错误 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartu

当出现这种错误时,你首先要做得是检查代码拼写错误 ,特别是字母拼写顺序错误、{ }不匹配,有很大概率是这种低级错误。接下来才考虑其它问题:   产生这个问题可能的原因 1, 你用vc建了一个控制台程序...
  • neuqbingoye
  • neuqbingoye
  • 2012年02月27日 20:07
  • 21257

关于error LNK2019::Unresolved External Symbol * Referenced In Function..解决办法

Error LNK2019:Unresolved External Symbol *** Referenced In Function ***的解决方案   当头文件中声明了一个函数,但是在相应的源文...
  • baidu_24736703
  • baidu_24736703
  • 2016年05月16日 20:12
  • 5611

error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

新建一个空的WIN32应用程序:
  • whatday
  • whatday
  • 2014年09月16日 11:33
  • 4064

C++故障排除-VS2010 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmai

报错:VS2010  error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTS...
  • breeze5428
  • breeze5428
  • 2015年09月13日 23:40
  • 2211

error LNK2019: 无法解析的外部符号 "void __cdecl cv::calcHist

今天用calcHist()写一个直方图的基本程序 结果报错LNK2019 在网上搜索一直是说库的链接不正确 但是我已经加入所有opencv的库了 最后的最后 发现是解决方案平台应该改成x64而不是Wi...
  • sinat_29547669
  • sinat_29547669
  • 2015年07月04日 20:43
  • 14835

OpenCV编程->无法解析的外部符号 "void __cdecl cv::cvtColor

首先定位cv::cvtColor 函数,找到其文件,
  • sunboyiris
  • sunboyiris
  • 2014年04月18日 10:57
  • 13216

VS2008 与Qt编程 出现.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall问题

VS2008 与Qt编程 出现.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall问题 ...
  • yao5210
  • yao5210
  • 2014年05月05日 09:18
  • 3222
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:error LNK2019: unresolved external symbol 问题
举报原因:
原因补充:

(最多只允许输入30个字)