Open Aruen24 opened 3 years ago
你的OpenCV放到/usr/local目录下吗?
[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o In file included from /usr/local/opencv-3.4.2/include/opencv2/calib3d.hpp:48:0, from /usr/local/opencv-3.4.2/include/opencv2/opencv.hpp:56, from /home/wangyuanwen/tensorrt_test/yolov5_tensorrt_int8/yolov5s_infer.cc:6: /usr/local/opencv-3.4.2/include/opencv2/features2d.hpp:50:10: fatal error: opencv2/flann/miniflann.hpp: No such file or directory
include "opencv2/flann/miniflann.hpp"
^
~~~~~~~~ compilation terminated. CMakeFiles/YoloV5sEngine.dir/build.make:62: recipe for target 'CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o' failed make[2]: [CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed make[1]: [CMakeFiles/YoloV5sEngine.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
你把opencv放到你的用户目录下试试
这是我的库截图,你看看你的库有没有链接上
原来系统是ubuntu16.04 不支持GLIBC_2.27,系统换成18.04可以正常编译了!
@wang911205我遇到了跟你一样的问题,请问还有其他解决方案吗?
[ 50%] Building CXX object CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o In file included from /usr/local/opencv-3.4.2/include/opencv2/calib3d.hpp:48:0, from /usr/local/opencv-3.4.2/include/opencv2/opencv.hpp:56, from /home/wangyuanwen/tensorrt_test/yolov5_tensorrt_int8/yolov5s_infer.cc:6: /usr/local/opencv-3.4.2/include/opencv2/features2d.hpp:50:10: fatal error: opencv2/flann/miniflann.hpp: No such file or directory
include "opencv2/flann/miniflann.hpp"
compilation terminated. CMakeFiles/YoloV5sEngine.dir/build.make:62: recipe for target 'CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o' failed make[2]: [CMakeFiles/YoloV5sEngine.dir/yolov5s_infer.cc.o] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/YoloV5sEngine.dir/all' failed make[1]: [CMakeFiles/YoloV5sEngine.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2