Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error building opencv 2.4.13 with Qt mingw

Dear All,

I am trying to configure OpenCV 2.4.13 with Qt MinGW. The config with CMAKE was successful, however, when I try to build with mingw32-make command I get the following error:

C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window_QT.cpp:2539:9: note: in expansion of macro 'foreach' foreach (QAction a, centralWidget->vect_QActions) ^ C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/qglobal.h:963:49: error: request for member 'control' in '_container_', which is of non-class type 'int' for (variable = *_container_.i; _container_.control; _container_.control = 0) ^ C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/qglobal.h:971:21: note: in expansion of macro 'Q_FOREACH' # define foreach Q_FOREACH ^ C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window_QT.cpp:2539:9: note: in expansion of macro 'foreach' foreach (QAction *a, centralWidget->vect_QActions) ^ C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/qglobal.h:963:70: error: request for member 'control' in '_container_', which is of non-class type 'int' for (variable = *_container_.i; _container_.control; _container_.control = 0) ^ C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtCore/qglobal.h:971:21: note: in expansion of macro 'Q_FOREACH' # define foreach Q_FOREACH ^ C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window_QT.cpp:2539:9: note: in expansion of macro 'foreach' foreach (QAction *a, centralWidget->vect_QActions) ^ C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window_QT.cpp: In member fun ction 'void DefaultViewPort::controlImagePosition()': C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window_QT.cpp:2748:21: error : ambiguous overload for 'operator=' (operand types are 'QTransform' and 'QTrans form') matrixWorld_inv = param_matrixWorld.inverted(); ^ In file included from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui/qimage.h:47:0, from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui/qpixmap.h:48, from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui/qicon.h:46, from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtWidgets/qabstractbu tton.h:43, from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtWidgets/qpushbutton .h:43, from C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtWidgets/QPushButton :1, from C:/opencv-2.4.13/opencv/sources/modules/highgui/src/window _QT.h:53, from C:\opencv-2.4.13\opencv\sources\modules\highgui\src\window _QT.cpp:47: C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui/qtransform.h:79:17: note: candidate: QTransform& QTransform::operator=(QTransform) QTransform &operator=(QTransform &&other) Q_DECL_NOTHROW // = default ^ C:/Qt/Qt5.7.0/5.7/mingw53_32/include/QtGui/qtransform.h:81:17: note: candidate: QTransform& QTransform::operator=(const QTransform&) QTransform &operator=(const QTransform &) Q_DECL_NOTHROW; // = default ^ modules\highgui\CMakeFiles\opencv_highgui.dir\build.make:193: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.obj' failed mingw32-make[2]: [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_Q T.cpp.obj] Error 1 CMakeFiles\Makefile2:2042: recipe for target 'modules/highgui/CMakeFiles/opencv_ highgui.dir/all' failed mingw32-make[1]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2

Makefile:145: recipe for target 'all' failed mingw32-make: * [all] Error 2

I desperately need your help. if any one can help