OpenCV4.1.1+QT5.13+QtCreater4.9.1+MinGW730 在windows10下的环境搭建教程的问题错误

参考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
成功
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值