2013-02-26 43 views
-1

我有一個項目,什麼加載圖片等。我想做對象檢測。我有一個來自haartrain的xml。下面的代碼然而不會編譯:如何在VS 2010中使用CascadeClassifier OpenCV

String berniurl= "D:\Dropbox\Egyetem\tanulmany2\kutyafelek\berni.xml"; 
CascadeClassifier berni_cascade; 

if(!berni_cascade.load(berniurl)){ 
    printf("--(!)Error loading\n"); 
}; 

VS2010,OpenCV2.2(從網站上下載已建成)。

和錯誤都在main.obj,如:

Error 7 error LNK2019: unresolved external symbol "public: __thiscall cv::CascadeClassifier::~CascadeClassifier(void)" ([email protected]@@[email protected]) referenced in function _main C:\Users\Gabor\Documents\Visual Studio 2010\Projects\opencvcucc\opencvcucc\main.obj 


Error 8 error LNK2019: unresolved external symbol "public: bool __thiscall cv::CascadeClassifier::load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function _main C:\Users\Gabor\Documents\Visual Studio 2010\Projects\opencvcucc\opencvcucc\main.obj 
+1

確保您已經運行了http://www.anlak.com/using-opencv-2-3-1-with-visual-studio-2010-tutorial/中的所有步驟(我認爲本教程比http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010) – banuj 2013-02-26 15:11:49

+0

謝謝!我錯過了libs中的一些依賴 – csomakk 2013-02-26 15:26:44

回答