OpenCV使用CMake和MinGW-w64的编译安装

OpenCV使用CMake和MinGW-w64的编译安装中的问题

问题:gcc: error: long: No such file or directory**
C:\PROGRA~2\Dev-Cpp\MinGW64\bin\windres.exe: preprocessing failed.
modules\core\CMakeFiles\opencv_core.dir\build.make:1420: recipe for target ‘modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj’ failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs…
CMakeFiles\Makefile2:1603: recipe for target ‘modules/core/CMakeFiles/opencv_core.dir/all’ failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2

解决办法:
搜索WITH_OPENGL进行勾选
搜索ENABLE_CXX11勾选
搜索WITH_IPP去掉勾选
搜索ENABLE_PRECOMPILED_HEADERS去掉勾选

问题:Makefile:164: recipe for target ‘all’ failed
mingw32-make: *** [all] Error 2

解决:搜索:BUILD_opencv_ts去掉勾选,点击 Configure,Generate 生成 Makefile
回到cmd运行mingw32-make -j 16问题解决

OpenCV使用CMake和MinGW-w64的编译安装_第1张图片


 

你可能感兴趣的:(opencv)