2013-01-17 106 views
0

我剛安裝了opencv 2.4.0。在編寫使用編譯opencv時出錯

g++ -I/usr/include -L/usr/lib -lopencv_core.2.4.0 -lopencv_calib3d.2.4.0  -lopencv_imgproc.2.4.0 -lopencv_legacy.2.4.0 -lopencv_highgui.2.4.0 asd.cpp 

一個示例代碼,我得到了以下錯誤

/usr/bin/ld: cannot find -lopencv_core.2.4.0 
/usr/bin/ld: cannot find -lopencv_calib3d.2.4.0 
/usr/bin/ld: cannot find -lopencv_imgproc.2.4.0 
/usr/bin/ld: cannot find -lopencv_legacy.2.4.0 
/usr/bin/ld: cannot find -lopencv_highgui.2.4.0 
collect2: ld returned 1 exit status 

預先感謝您。

+0

你在哪裏把它安裝到? –

+0

我遵循這些說明http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/ – Varun

回答

0

您使用命令行:定位opencv_core.2.4.0找到路徑 路徑添加到您的命令