编译OpenCV

1.进入第二部分编译后的生成文件目录E:\software\opencv-3.4.2\build

输入“mingw32-make”命令,按回车进行编译。

81485fc7b13a5b75be43ec3d9d3a867c07f.jpg

2ea7946978e3a9f97fc74322912182afb5a.jpg

等待编译:

发现错误: identifier ‘nullptr’ is a keyword in C++11 错误

b16df804ffdf9d63c53a3e7f3f5bfe69190.jpg

解决:

这是因为c++11引入了nullptr,所以给make添加参数,直接回到cmake添加:

在 cmake-gui 编译配置中:

勾选 ENABLE_CXX11

然后重新Configure-Generate-mingw32-make

再次编译,再次出现: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scope

9ef944c29168f053a741ab1053ab50a0715.jpg

解决:

f671a799c0f946a31e40bb1cf57a1865008.jpg

然后回到命令行,继续编译,发现

125aeb34fdcb527f24e4bf7aaf782d5969c.jpg

解决:error: 'MFP_MEDIAITEM_CHARACTERISTICS' has not been declared
参考:https://stackoverflow.com/questions/50333886/opencv-installation-on-windows
When not using Visual Studio, you have to disable some features which are not supported. Build with cmake options WITH_IPP=OFF and WITH_MSMF=OFF

转载于:https://my.oschina.net/u/3919756/blog/1935361

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值