[ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/opencv_stitching_pch_dephelp.cxx.o
In file included from /home/pi/opencv-3.4.0/build/modules/stitching/opencv_stitching_pch_dephelp.cxx:1:
/home/pi/opencv-3.4.0/modules/stitching/src/precomp.hpp:91:12: fatal error: opencv2/xfeatures2d/cuda.hpp: 没有那个文件或目录
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/build.make:63:modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/opencv_stitching_pch_dephelp.cxx.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:21443:modules/stitching/CMakeFiles/opencv_stitching_pch_dephelp.dir/all] 错误 2
make: *** [Makefile:163:all] 错误 2
根据
/home/pi/opencv-3.4.0/modules/stitching/src/precomp.hpp
打开,找到# include "opencv2/xfeatures2d/cuda.hpp"语句
改为绝对路径,再文件管理器里找,复制文件管理器的路径