-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作者您好! 我在make的时候报错,找不到opencv2/opencv.cpp文件 #44
Comments
在CMakeLists.txt里面加上 find_package( OpenCV x.x.x REQUIRED ) cmake会自动帮你找到你的版本的opencv库文件和头文件的 |
@liudakai2 加上这个还是不行 find_package(OpenCV 4 REQUIRED) [ 81%] Linking CXX shared library ../../lib/libmynvonnxparser_runtime.so 还是报这个错误,找不到opencv2/opencv.hpp |
你试试加三级版本号,比如4.1.1,要么就不加那个4,主要是看cmake找不找得到你的opencv,然后才能make
…---原始邮件---
发件人: "jxuepeng"<notifications@github.com>
发送时间: 2020年7月27日(星期一) 中午11:19
收件人: "CaoWGG/TensorRT-YOLOv4"<TensorRT-YOLOv4@noreply.github.com>;
抄送: "Mention"<mention@noreply.github.com>;"Liu Kai"<951522847@qq.com>;
主题: Re: [CaoWGG/TensorRT-YOLOv4] 作者您好! 我在make的时候报错,找不到opencv2/opencv.cpp文件 (#44)
@liudakai2 加上这个还是不行 find_package(OpenCV 4 REQUIRED)
[ 81%] Linking CXX shared library ../../lib/libmynvonnxparser_runtime.so
[ 81%] Built target mynvonnxparser_runtime
[ 84%] Building NVCC (Device) object src/CMakeFiles/trt.dir/trt_generated_resize.cu.o
Scanning dependencies of target trt
[ 86%] Building CXX object src/CMakeFiles/trt.dir/trt.cpp.o
In file included from /home/hyzt/projects/TensorRT-YOLOv4-master/src/trt.cpp:5:0:
/home/hyzt/projects/TensorRT-YOLOv4-master/src/../include/trt.h:13:30: fatal error: opencv2/opencv.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/trt.dir/build.make:89: recipe for target 'src/CMakeFiles/trt.dir/trt.cpp.o' failed
make[2]: *** [src/CMakeFiles/trt.dir/trt.cpp.o] Error 1
CMakeFiles/Makefile2:464: recipe for target 'src/CMakeFiles/trt.dir/all' failed
make[1]: *** [src/CMakeFiles/trt.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
还是报这个错误,找不到opencv2/opencv.hpp
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@liudakai2 我在cmake-gui里能看见opencv的路径, cmake也能过, 但是make的时候就是找不到oepncv.hpp,都好几天了 |
/media/hyzt/HYZT_Disk_3T/TensorRT-YOLOv4-master/src/../include/trt.h:13:30: fatal error: opencv2/opencv.hpp: No such file or directory
compilation terminated.
src/CMakeFiles/trt.dir/build.make:220: recipe for target 'src/CMakeFiles/trt.dir/trt.cpp.o' failed
The text was updated successfully, but these errors were encountered: