Error building opencv 3.3.0 Windows 10 Cmake 3.10

asked 2017-10-16 15:05:54 -0500

dfanon gravatar image

I was trying to build opencv to use in Code::Blocks following this guide: link: While building, I got the following error. How to proceed?

[ 39%] Building RC object modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj

gcc: error: SOFTWARE\opencv\sources\3rdparty\include\ffmpeg_: No such file or directory gcc: error: unrecognized command line option '-\' C:\MinGW\bin\windres.exe: preprocessing failed. modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:236: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj' failed mingw32-make[2]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj] Error 1 CMakeFiles\Makefile2:2912: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed mingw32-make[1]: [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 Makefile:161: recipe for target 'all' failed mingw32-make: ** [all] Error 2

edit retag flag offensive close merge delete


your tutorial is far too outdated, to be useful (please do not go there again.)

for now, try to disable precompiled headers in cmake, clean your build folder, and rerun cmake

(there's no more real support for mingw, there will be more errors.)

berak gravatar imageberak ( 2017-10-16 18:21:37 -0500 )edit

Thank you very much,this will save me some time. If there is no more support for mingw, what other should I use to correctly build opencv? The Windows release pack isn't working for Code::Blocks

dfanon gravatar imagedfanon ( 2017-10-16 21:50:03 -0500 )edit

use vs2015, or suffer pain (like me...)

berak gravatar imageberak ( 2017-10-17 00:05:14 -0500 )edit

Seems like the only choice... I would rather use linux, but I have some libraries built for windows that would be a pain to open in ubuntu. Thanks again, man

dfanon gravatar imagedfanon ( 2017-10-17 00:22:07 -0500 )edit