1. 程式人生 > >error LNK2019: unresolved external symbol 問題

error LNK2019: unresolved external symbol 問題

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CvSVM::~CvSVM(void)" ([email protected]@[email protected]) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "int __cdecl cv::waitKey(int)" ([email protected]@@[email protected]
) 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 &)" ([email protected]@@[email protected]
[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@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 &)" (
[email protected]
@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@ABV_In[email protected]@[email protected][email protected]@[email protected]@@[email protected]@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::_InputArray::_InputArray(class cv::Mat const &)" ([email protected]@@[email protected]@[email protected]@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: virtual float const * __thiscall CvSVM::get_support_vector(int)const " ([email protected]@@[email protected]) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: virtual int __thiscall CvSVM::get_support_vector_count(void)const " ([email protected]@@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)" ([email protected]@@[email protected]@[email protected]@[email protected][email protected]@[email protected]@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 " ([email protected]@@[email protected]@@[email protected]) 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)" ([email protected]@@[email protected]@@[email protected]@@Z) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CvSVM::CvSVM(void)" ([email protected]@[email protected]) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall CvSVMParams::CvSVMParams(void)" ([email protected]@[email protected]) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: static class cv::MatExpr __cdecl cv::Mat::zeros(int,int,int)" ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function _main 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::copySize(class cv::Mat const &)" ([email protected]@[email protected]@[email protected]@Z) referenced in function "public: __thiscall cv::Mat::Mat(class cv::Mat const &)" ([email protected]@@[email protected]@@Z) 1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::Exception::~Exception(void)" ([email protected]@@[email protected]) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" ([email protected]@@[email protected]@Z) 1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::error(class cv::Exception const &)" ([email protected]@@[email protected]@@Z) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" ([email protected]@@[email protected]@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)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) referenced in function "public: __thiscall cv::Mat::Mat(int,int,int,void *,unsigned int)" ([email protected]@@[email protected]@Z) 1>main.obj : error LNK2019: unresolved external symbol "void __cdecl cv::fastFree(void *)" ([email protected]@@[email protected]) referenced in function "public: __thiscall cv::Mat::~Mat(void)" ([email protected]@@[email protected]) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" ([email protected]@[email protected]@QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" ([email protected]@[email protected]@QAEXXZ) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::create(int,int const *,int)" ([email protected]@[email protected]@[email protected]) referenced in function "public: void __thiscall cv::Mat::create(int,int,int)" ([email protected]@[email protected]@[email protected]) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::MatConstIterator::seek(int,bool)" ([email protected]@[email protected]@[email protected]) referenced in function "public: class cv::MatConstIterator & __thiscall cv::MatConstIterator::operator++(void)" ([email protected]@@[email protected]) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::Mat::convertTo(class cv::_OutputArray const &,int,double,double)const " ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" ([email protected]@[email protected]@[email protected]@[email protected]@Z) 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::_OutputArray::_OutputArray(class cv::Mat &)" ([email protected]@@[email protected]@[email protected]@Z) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" ([email protected]@[email protected]@[email protected]@[email protected]@Z) 1>main.obj : error LNK2019: unresolved external symbol "public: class cv::Mat __thiscall cv::Mat::reshape(int,int,int const *)const " ([email protected]@[email protected]@[email protected]@Z) referenced in function "public: class cv::Mat_<float> & __thiscall cv::Mat_<float>::operator=(class cv::Mat const &)" ([email protected]@[email protected]@[email protected]@[email protected]@Z) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::MatConstIterator::seek(int const *,bool)" ([email protected]@[email protected]@[email protected]) referenced in function "public: __thiscall cv::MatConstIterator::MatConstIterator(class cv::Mat const *)" ([email protected]@@[email protected]@[email protected]@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 LNK2019:unresolved external symbol

出現以下錯誤: Error 1 error LNK2019: unresolved external symbol [email protected] referenced in function _main TcpClient.obj Error 2 erro

error LNK2019: unresolved external symbol 問題

main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CvSVM::~CvSVM(void)" ([email protected]@[email 

error LNK2001: unresolved external symbol "int g_cTemplates" (?g_cTemplates@@3HA)(轉)

win dir 完整路徑 compile microsoft def mailto pre 註意 原文轉自:http://blog.sina.com.cn/s/blog_639a2ad70101kpen.html 編譯directshow若幹問題的解決 1.安裝好win

問題error LNK2001: unresolved external symbol "public: static class解決

錯誤提示: ...error LNK2001: unresolved external symbol "public: static class A obj... 再主類中定義了一個A類的靜態變數  出現連結錯誤 解決辦法 對靜態變數進行初始化就行了。再類外面初始

VC++ 6.0開發OCX控制元件時遇到LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main問題解決記錄

當你OCX控制元件的ReleaseMinDependency版時,你得到了下面這個連結錯誤:    LIBCMT.LIB(crt0.obj) : error LNK2001: unresolved external symbol _main 而Debug版本的編連卻順利通

error LNK2001: unresolved external symbol __imp_FindWindowW

出現這樣的情況原因之一可能是使用不正確的方法錯誤添加了其他lib檔案導致; 如下新增ICE庫: 原有的內容如下: 因

LINK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string的解決方案

事情的起因是用VS2003編譯ogre的時候,寫了一個demo,死活連結不過,總是提示,unresolved external symbol "__declspec(dllimport) public: class std::basic_string,很鬱悶的,甚至一度想要放棄VS2003算了,但是

用keil編譯多檔案程式時出現UNRESOLVED EXTERNAL SYMBOL警告

UNRESOLVED EXTERNAL SYMBOL翻譯為中文為:未解決的外部符號,出現該問題的原因卻是很低階,我查了好久的程式都不思其解,最後在網上找到了答案,原來是因為沒有把部分.c檔案新增到專案

QT遇到unresolved external symbol "public: virtual struct QMetaObject解決方案

出現這個錯誤的原因是沒有為標頭檔案生產moc檔案,在類定義包含Q_OBJECT巨集都是必需有這個moc檔案的。 右擊該標頭檔案,屬性,General的Item Type選擇Custom Build Tool,確定。再重新進入General介面,點選Custom

Qt程式設計之訊號與槽-------unresolved external symbol "public: virtual struct QMetaObject const * __thiscall XX::metaObject(void)const

原因是加入Q_OBJECT這個macro的類,被編譯的時候就要用到moc這個命令,所以在VS2010中,沒有加入此命令的應用,當然會出錯了。所以解決辦法是加,或者如果你不使用訊號槽可以直接刪除。 當要在GUI中用到訊號與槽,就需在.h檔案中的類裡寫入Q_OBJECT巨集。而任何含有Q_Object的類都

unresolved external symbol
MFC error LNK2019

color size 編譯報錯 pan font spa 添加 -i 對象 MFC 添加對話框引用對話框對象時 編譯報錯:error LNK2019,解決辦法是在工程文件上選擇對話框類文件右鍵---->屬性---Item Type改為C/C++ header(.h)和

error LNK2019: 無法解析的外部符號;fatal error LNK1120: 1 個無法解析的外部命令; 可能存在的問題

alt 配置 pan ron ima detail deb 16px 管理 一、問題:使用一個.lib出現如下錯誤 (我使用的環境 vs2012)   error LNK2019: 無法解析的外部符號 _SSL_CTX_new,該符號在函數 _main 中被引用;   fa

錯誤 1 error LNK2019: 無法解析的外部符號 "public: __thiscall Distance::Distance(int)" (??0Distance@@QAE@H@Z),該符號在函數 _main 中被引用

his 無法 析構函數 this distance AI sta 語法 解析 錯誤: 錯誤 1 error LNK2019: 無法解析的外部符號 "public: __thiscall Distance::Distance(int)" (??0Distance@@QAE@

Qt error: LNK2019: 無法解析的外部符號 解決

按照以下幾個步驟依次執行: 1、確認導包是否正確,尤其自定義的檔案; 2、構建-->清理專案,然後執行 qmake; 3、是否有槽函式宣告,卻沒有實現或刪除; 4、自定義類時,建構函式或者解構函式沒有實現; 特別一點的 5、是否需要修改pro檔案。例如: 使用QPr

【C++】error LNK2019: 無法解析的外部符號

轉:C++ error LNK2019: 無法解析的外部符號 錯誤解決方案 今天在實現類模板特例化的時候遇到一個問題,就是把類模板函式實現放到類的cpp檔案中,然後在main函式中使用這個類的時候,就會出現無法解析的外部符號:函式名(xxxx)等錯誤,那麼出現這個錯誤的原因是什麼呢? 原

error LNK2019-無法解析的外部符號 _main-該符號在函式 ___tmainCRTStartup 中被引用

問題分析: 因為Win32 console Application的入口函式是Main(),而Win32 Application的入口函式才是WinMain() 解決方案: 右鍵專案,開啟【屬性】頁,【配置屬性】——【連結器】——【系統】中的【子系統】改為【視窗 (/SUBSYSTEM:WINDOWS)