我在項目中運行CMake(實際上是rosmake)時收到錯誤消息。我已經安裝了OpenCV,但出現以下錯誤:在Ubuntu中編譯基於OpenCV和ROS的項目
Linking CXX shared library ../lib/libCornerHelper.so
/usr/bin/ld: cannot find -lopencv_contrib
/usr/bin/ld: cannot find -lopencv_legacy
/usr/bin/ld: cannot find -lopencv_stitching
/usr/bin/ld: cannot find -lopencv_gpu
/usr/bin/ld: cannot find -lopencv_objdetect
/usr/bin/ld: cannot find -lopencv_calib3d
/usr/bin/ld: cannot find -lopencv_features2d
/usr/bin/ld: cannot find -lopencv_video
/usr/bin/ld: cannot find -lopencv_highgui
/usr/bin/ld: cannot find -lopencv_ml
/usr/bin/ld: cannot find -lopencv_imgproc
/usr/bin/ld: cannot find -lopencv_flann
/usr/bin/ld: cannot find -lopencv_core
collect2: ld returned 1 exit status
make[3]: *** [../lib/libCornerHelper.so] Error 1
有沒有人知道如何解決這個問題?
聽起來像你在安裝OpenCV後沒有運行'ldconfig'。或者,安裝OpenCV的路徑不在'ld.so.conf'中。 – mevatron