1.进入第二部分编译后的生成文件目录E:\software\opencv-3.4.2\buildc++
输入“mingw32-make”命令,按回车进行编译。windows
等待编译:ide
发现错误: identifier ‘nullptr’ is a keyword in C++11 错误ui
解决:this
这是由于c++11引入了nullptr,因此给make添加参数,直接回到cmake添加:命令行
在 cmake-gui 编译配置中:c++11
勾选 ENABLE_CXX11blog
而后从新Configure-Generate-mingw32-makeit
再次编译,再次出现: error: 'sprintf_instead_use_StringCbPrintfA_or_StringCchPrintfA' was not declared in this scopeio
解决:
而后回到命令行,继续编译,发现
解决: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