這也許是一個小白的問題,但我一直堅持了一段時間,我感謝所有幫助...錯誤,而建設的OpenCV 2.4.5應用與Eclipse和Ubuntu 13.04
我已經能夠安裝OpenCV並運行使用終端沒有任何但是問題我想使用Eclipse來管理我的項目很容易一個示例應用程序...
我按照 http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html
在此[鏈接]由OpenCV的教程中的說明我遵循了一切,我仍然得到以下錯誤
/usr/bin/ld: cannot find -llibopencv_calib3d
/usr/bin/ld: cannot find -llibopencv_contrib
/usr/bin/ld: cannot find -llibopencv_core
/usr/bin/ld: cannot find -llibopencv_features2d
/usr/bin/ld: cannot find -llibopencv_flann
/usr/bin/ld: cannot find -llibopencv_gpu
/usr/bin/ld: cannot find -llibopencv_highgui
/usr/bin/ld: cannot find -llibopencv_imgproc
/usr/bin/ld: cannot find -llibopencv_legacy
/usr/bin/ld: cannot find -llibopencv_ml
/usr/bin/ld: cannot find -llibopencv_nonfree
/usr/bin/ld: cannot find -llibopencv_objdetect
/usr/bin/ld: cannot find -llibopencv_photo
/usr/bin/ld: cannot find -llibopencv_stitching
/usr/bin/ld: cannot find -llibopencv_superres
/usr/bin/ld: cannot find -llibopencv_ts
/usr/bin/ld: cannot find -llibopencv_video
/usr/bin/ld: cannot find -llibopencv_videostab
collect2: error: ld returned 1 exit status
make: *** [Test_OpenCV01] Error 1
,唯一的區別我能我的步驟之間找到和教程: 當我運行命令:
pkg-config --libs opencv
這是我的輸出
/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so
所以庫名稱有點不同,所以我使用我擁有的名稱。
一個從蝕全自動執行的命令行是
g++ -L/usr/local/lib/ -o "Test_OpenCV01" ./src/main.o -llibopencv_calib3d -llibopencv_contrib -llibopencv_core -llibopencv_features2d -llibopencv_flann -llibopencv_gpu -llibopencv_highgui -llibopencv_imgproc -llibopencv_legacy -llibopencv_ml -llibopencv_nonfree -llibopencv_objdetect -llibopencv_photo -llibopencv_stitching -llibopencv_superres -llibopencv_ts -llibopencv_video -llibopencv_videostab
它明確規定庫路徑是/ usr /本地/ LIB /其是其中共享庫在然而,在它說的錯誤它無法在/ usr/bin/ld中找到lib文件
ps 我試圖既
1)配置OpenCV進行使用共享庫:
須藤的gedit /etc/ld.so.conf.d/opencv.conf
並添加以下行在文件結尾
/usr/local/lib保存後運行sudo ldconfig。
2)運行命令
出口LD_LIBRARY_PATH =在/ usr/local/lib目錄
我還添加了
PKG_CONFIG_PATH = $ PKG_CONFIG_PATH:在/ usr /本地/ lib/pkgconfig export PKG_CONFIG_PATH
到/etc/bash.bashrc文件的末尾。
感謝您的高級幫助。