天天看点

No rule to make target '../lib/libopencv_core3.so.3.3.1', needed by '../VIO'解决办法

报错现象:

make[2]: *** No rule to make target '../lib/libopencv_core3.so.3.3.1', needed by '../VIO'。 停止。
CMakeFiles/Makefile2:163: recipe for target 'CMakeFiles/VIO.dir/all' failed
make[1]: *** [CMakeFiles/VIO.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

           

解决办法:

在库目录的设置中,添加libopencv_core.so.3.3.1的直接路径,如下:

set(LIBS 
${OpenCV_LIBS} 
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
#${PROJECT_SOURCE_DIR}/lib/libopencv_core3.so.3.3.1
#${PROJECT_SOURCE_DIR}/lib/libopencv_core3.so.3.3
/usr/local/lib/libopencv_core.so.3.3.1
)
           

既可解决问题。