Why can't i build openCV.cbp in codeblocks?
It shows this error message when i try build it.
-C:\MinGW\bin\windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-iamcu elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
-mingw32-make.exe[2]: * [modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
-mingw32-make.exe[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
-mingw32-make.exe: * [all] Error 2
-modules\core\CMakeFiles\opencv_core.dir\build.make:1638: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj' failed
-mingw32-make.exe[2]: Leaving directory 'C:/Program Files (x86)/opencv/MyopenCV'
-CMakeFiles\Makefile2:1640: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
-mingw32-make.exe[1]: Leaving directory 'C:/Program Files (x86)/opencv/MyopenCV'
-C:/Program Files (x86)/opencv/MyopenCV/Makefile:161: recipe for target 'all' failed
-Process terminated with status 2 (0 minute(s), 7 second(s))
-5 error(s), 0 warning(s) (0 minute(s), 7 second(s))
this is a known problem , when trying to build opencv libs using mingw
please go back to cmake, disable precompiled headers, clean your build folder,and try again.
Now i get these errors gcc: error: Files\: No such file or directory
gcc: error: (x86)\opencv\sources\3rdparty\include\ffmpeg_: No such file or directory
C:\MinGW\bin\windres.exe: preprocessing failed.
and further down:
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.exe[2]: Leaving directory 'C:/Program Files (x86)/opencv/MyopenCV'
CMakeFiles\Makefile2:2999: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
mingw32-make.exe[1]: Leaving directory 'C:/Program Files (x86)/opencv/MyopenCV'
C:/Program Files (x86)/opencv/MyopenCV/Makefile:161: recipe for target 'all' failed
which mingw is it, exactly ? (you have to use some mingw64, the 32bit version won't do)
did you really clean the build folder before running cmake again ?
add the cmake output to your question (it's long..)
otherwise, no idea.
I just deleted the folder i called MyopenCV
I had the 32 bit version, and i now have the 64 bit one, but now i get a new error:
gcc: error: Files\: No such file or directory
gcc: error: (x86)\opencv\sources\3rdparty\include\ffmpeg_: No such file or directory C:\PROGRA~1\MINGW-~1\X86_64~1.0-P\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make.exe[2]: * [modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:262: modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj] Error 1
mingw32-make.exe[1]: * [CMakeFiles\Makefile2:3000: modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
mingw32-make.exe: * [C:/Program Files (x86)/opencv/OpenCv/Makefile:162: all] Error 2
i can only guess, but maybe you setup the compiler related things wrong, when running cmake.
try to use cmake-gui, give it the path to mingw32-make.exe, it should infer the other tools from there.
@Swagsquad: Could you solve the problem ? I am having nearly the same, see http://answers.opencv.org/question/18...