1

I'm trying to build OpenCV 3.2.0 vc14 from its sources with MinGW 5.3.0 32 bit in order to use its functionality from Qt 5.8. My platform is Windows 7 64 bit.

The main instruction I follow is here, on Qt's wiki. On several steps, I encounter errors for which I haven't found solutions yet. As I am a newbie, I apologize for my helplessness and will appriciate any suggestions.

Error 1. On the stage of generating build files.

In cmake-gui (cmake-3.2.1-win32-x86), I precisely follow the steps specified in the Qt wiki article mentioned above. However, during the final generation, the following CMake error occurs at the end:

CMake Error in modules/highgui/CMakeLists.txt:
No known features for CXX compiler
"GNU"
version 5.3.0.
Generating done

I wonder how it affects the project files and if it causes the next errors.

Error 2. When trying to build OpenCV

The build process is interrupted midway, logging the following:

In file included from C:/Qt/Tools/mingw530_32/i686-w64-
mingw32/include/c++/type_
traits:35:0,
from C:/Qt/5.8/mingw53_32/include/QtCore/qglobal.h:45,
from C:/Qt/5.8/mingw53_32/include/QtCore/QtCore:4,
from C:/Qt/5.8/mingw53_32/include/QtOpenGL/QtOpenGLDepends:3,
from C:/Qt/5.8/mingw53_32/include/QtOpenGL/QtOpenGL:3,
from C:/opencv/sources/modules/highgui/src/window_QT.h:46,
from C:\opencv\sources\modules\highgui\src\window_QT.cpp:47:
C:/Qt/Tools/mingw530_32/i686-w64-
mingw32/include/c++/bits/c++0x_warning.h:32:2:
error: #error This file requires compiler and library support for the ISO 
C++ 2011 standard. This support is currently experimental, and must be 
enabled with the -std=c++11 or -std=gnu++11 compiler options.

(...)

C:/Qt/5.8/mingw53_32/include/QtCore/qcompilerdetection.h:562:6: error: 
#error Qt requires a C++11 compiler and yours does not seem to be that.

(...)

                      ^
C:/Qt/5.8/mingw53_32/include/QtCore/qtypeinfo.h:62:40: error: expected 
primary-expression before '>' token isIntegral = std::is_integral<T>::value,
                                    ^
C:/Qt/5.8/mingw53_32/include/QtCore/qtypeinfo.h:62:41: error: '::value' has 
not been declared isIntegral = std::is_integral<T>::value,

NOTE: I also had sprintf() family security error. So I followed Alex's suggestion to add add_definitions(-DSTRSAFE_NO_DEPRECATE) to the beginning of CMakeLists.txt to suppress the error.

Thank you for your time.

Community
  • 1
  • 1

0 Answers0