我正在尝试从https://docs.opencv.org/master/db/df5/tutorial_linux_gcc_cmake.html运行示例代码。我使用Ubuntu16。我在/home/marcin/opencv/
目录中安装了OpenCV。我像示例一样使用CMakeLists.txt
文件,并添加了行
set (CMAKE_CXX_STANDARD 11)
我在码头跑
cmake -D CMAKE_PREFIX_PATH=/home/marcin/opencv/build
,我得到正输出。但是当我尝试运行make命令时,我得到了:
make[2]: *** No rule to make target '/home/marcin/opencv/build/lib/libopencv_core.so.4.0.1',
needed by 'DisplayImage'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DisplayImage.dir/all' failed
make[1]: *** [CMakeFiles/DisplayImage.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
答案 0 :(得分:0)
按照@Tsyvarev建议,我又重新安装了一次库。好像坏了。