Important: Please read the Qt Code of Conduct -

qopenglversionfunctions.h:1098:23: error: unknown type name 'GLDEBUGPROC' QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);

  • Re: GLDEBUGPROC symbol not defined

    using MacOS 10.15 Catalina, Qt 5.15.0 and cmake.
    I can't compile my project because of the following error:

    In file included from /Users/user/Qt/5.15.0/clang_64/lib/QtGui.framework/Headers/QOpenGLFunctions:1:
    In file included from /Users/user/Qt/5.15.0/clang_64/lib/QtGui.framework/Headers/qopenglfunctions.h:55:
    In file included from /Users/user/Qt/5.15.0/clang_64/lib/QtGui.framework/Headers/qopenglcontext.h:61:
    /Users/user/Qt/5.15.0/clang_64/lib/QtGui.framework/Headers/qopenglversionfunctions.h:1098:23: error: unknown type name 'GLDEBUGPROC'

    I googled for hours but i can't find a real solution to this problem which i've found popping here and there in different projects.

    The same application compiles and runs fine on both Windows 10 and Linux, i'm stuck, please help!
    Thanks a lot

  • I have recently run into this issue on Mac 10.15.7 as well running Qt 5.15.1. I have tried several different things to resolve it with setting the QSurfaceFormat including setting the major version lower than 4 to see if this will compile out with no luck.

    I searched the macOSX 10.15.sdk for the OpenGL.framework and GLDEBUGPROC is never defined anywhere in those header files like the other typedefs being used in the Qt header file. If I delete this offending line in qopenglfersionfunctions.h, my app compiles and seems to run.

    I wouldn't call this an acceptable solution to fixing this problem, but it is where I am starting from. Hopefully it helps.

  • Lifetime Qt Champion


    Did you check the bug report system ?

    Apple phasing out OpenGL they may have removed something that was there not long ago.

  • Hey @SGaist, Thanks for responding.

    I searched for a bit in the bug report system. I didn't find anything with the GLDEBUGPROC in it and searched for "OpenGL" and started going back through time looking at individual issues and didn't see anything into 2018. It is very possible Apple removed something, but this didn't occur to me because of an update from Apple, but an update in a dependency.

    For me, this is related to a dependency that uses OpenGL. I am linking my application against this dependency that is built as a framework. If I build the dependency using OpenGL 1, the application builds, links, and runs fine. If I update that dependency to use OpenGL 3, this error gets thrown. If I swap it back out for the old version and hit build, it works again.

    In trying to look through the source code. It looks like this might get triggered in "qopenglversionfunctions.cpp" when it checks #if !defined(QT_OPENGL_ES_2) and it looks like it starts defining those functions at that point. I'm not entirely sure. I'm assuming there is something in my dependency's header files getting defined that Qt is picking up and using. Need to try tracking that down.

Log in to reply