I know... Another one of this... But no one else's error is the same as mine and I've been trying to build opencv with mingw32 for days now.
When building OpenCV with mingw the command mingw32-make
fails at some point trying to compile sources\modules\ts\src\ts_gtest.cpp
with error pic bellow:
I've tried following several tutorials, but none work cleanly and this is the best I could get stuff to work.
What I did:
- Installed Mingw and added
C:\Mingw\bin\
to PATH environment variable. - Installed CMake and added it too to PATH.
- Extracted OpenCV to
C:\
and created forlderC:\opencv\mingwBuild\
- In CMake-GUI I define source folder as
C:\opencv\sources\
and build folder asC:\opencv\mingwBuild\
. - Hit Configure and select
Mingw Makefiles
, with 'Use default native compilers' (have also specified compilers explicitly and the result is the same.). - Hit Generate, which creates the Makefile.
- I open
C:\Mingw\msys\1.0\msys.bat
to have a console with all variables loaded (have also tried directly from a simple cmd.exe, given that PATH is set for mingw, but I get the same error in compilation). Navigate toC:\opencv\mingwBuild\
and runmingw32-make
.
And that's where the error shows up after a while. Any ideas?