Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT definition of GL_GLEXT_VERSION differs from Open GL defintion



  • Folks

    I am working on a existing app with QT5 (version 5.12.5) that has been moved to the RHEL8 system. The app uses Open GL for graphics.

    I am getting a warning of the #define GL_GLEXT_VERSION being redefined.

    Looking at it, QT has its own version of the definition in qt5/QtGui/qopenglext.h (provided by the qt5-qtbase-devel package), while the OpenGL library we installed in gl/glext.h (provided by mesa-libGL-devel package) has another, newer version.

    There are some differences between the 2, in that the glext.h has additional features and support for a newer version (4.6 apparently), and uses a different method to define a few types that apparently resolves the same for our purposes.

    The headers collide because glext.h uses __gl_glext_h has its guard macro, when qopenglext.h uses _glext_h as its guard macro.

    My question would be, should I be concerned with possible issues, or is this just something that will get fixed later. I generally do not like warning in my production code builds, and given that neither file is directly included, I can't just not include one in favor of the other.

    Dale Pennington


Log in to reply