You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
highgui: Compilation error with Qt5 due to #ifdef Q_WS_X11 guard #6471
I get the following compilation error when building against Qt5:
/var/tmp/paludis/build/media-libs-opencv-3.1.0-r2/work/opencv-3.1.0/modules/highgui/src/window_QT.cpp: In member function 'virtual void OpenGlViewPort::initializeGL()':
/var/tmp/paludis/build/media-libs-opencv-3.1.0-r2/work/opencv-3.1.0/modules/highgui/src/window_QT.cpp:3168:12: error: 'GL_PERSPECTIVE_CORRECTION_HINT' was not declared in this scope
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
^
modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:104: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o' failed
This is caused by the #ifdef Q_WS_X11 guard around the #include <GL/glx.h> which is no longer defined by Qt5. Qt5 now defines Q_OS_* constants.
I would provide a fix, but I'm not certain whether to use Q_OS_UNIX or Q_OS_LINUX here
Activity