参考https://blog.csdn.net/ltc0106/article/details/100189313?spm=1001.2014.3001.5506
1.Qt5_DIR未找到
Add Entry自己创建path命名为Qt5_DIR
2.mingw32-make.exe -j 出错
[ 95%] Linking CXX shared library …\bin\libopencv_stitching2410.dll
[ 95%] Built target opencv_stitching
mingw32-make.exe: *** [Makefile:155: all] Error 2
解决:ctrl+F 向上查找error详细信息
E:\opencv\opencv_source\opencv\sources\modules\contrib\src\chamfermatching.cpp:969:30: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
E:\opencv\opencv_source\opencv\sources\modules\contrib\src\chamfermatching.cpp:1016:34: error: the compiler can assume that the address of ‘annotate_img’ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
E:\opencv\opencv_source\opencv\sources\modules\contrib\src\chamfermatching.cpp: In member function ‘cv::ChamferMatcher::Match* cv::ChamferMatcher::Matching::localChamferDistance(cv::Point, cv::Mat&, cv::Mat&, cv::ChamferMatcher::Template*, float)’:
E:\opencv\opencv_source\opencv\sources\modules\contrib\src\chamfermatching.cpp:1111:25: error: the compiler can assume that the address of ‘orientation_img’ will never be NULL [-Werror=address]
if (&orientation_img!=NULL) {
找到E:\opencv\opencv_lib\modules\contrib\CMakeFiles\opencv_contrib.dir\flags.make
用notepad++编辑删除掉-Werror=address
重新执行mingw32-make.exe -j
再执行mingw32-make.exe install
成功