我在项目中运行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