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问题解决
文章来源:https://www.toymoban.com/news/detail-687117.html
文章来源地址https://www.toymoban.com/news/detail-687117.html
到了这里,关于OpenCV使用CMake和MinGW-w64的编译安装的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!