Ask Your Question

Revision history [back]

Building OpenCV 3.4.1 from source [MinGW32, cmake 3.6.2, Qt 5.10, Windows 10]

Hello,

I am trying to build OpenCV 3.4.1 from source using CMake (GUI) and MinGW. I didn't find another way to use the OpenCV library in Windows. I use Qt as programming environment and want to extend a C++ project which includes OpenCV 3.

I followed this tutorial to compile the sources. Unfortunately, I get some errors in the building step using the "mingw32-make" command.

Scanning dependencies of target opencv_videoio
[ 44%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj
[ 44%] Building RC object modules/videoio/CMakeFiles/opencv_videoio.dir/vs_version.rc.obj
gcc: error: 3.4.1\sources\3rdparty\include\ffmpeg_: No such file or directory
C:\MinGW\bin\windres.exe: preprocessing failed.
modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:261: 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:5113: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I already tried to disable the WITH_FFMPEG flag, since I do not need FFMPEG for my project, but the errors remain.

Do you have an idea how to overcome this errors?

Thank you for your help!