Important: Please read the Qt Code of Conduct -

[SOLVED] Qt 5.2.1 OS X clang: no type named 'glClearDepthf' in the global namespace

  • After upgrading from 5.2.0 to 5.2.1, I get this error in qopenglfunctions.h:

    @/Users/j/Qt/5.2.1/clang_64/lib/QtGui.framework/Versions/5/Headers/qopenglfunctions.h:573: error: no type named 'glClearDepthf' in the global namespace

    The relevant code in qopenglfunctions.h looks like this:

    @inline void QOpenGLFunctions::glClearDepthf(GLclampf depth)
    #ifndef QT_OPENGL_ES

    And here are my CONFIG and QT lines from the .pro file:

    @QT += core gui widgets opengl
    CONFIG += c++11 dll@

    I'm pretty stumped here. Any help would be nice.

  • Lifetime Qt Champion


    What version of OS X are your running on ?

  • 10.9.1.

    I should add that the Hello GL sample program compiles without problems.

  • Lifetime Qt Champion

    Then do you have anything that might define QT_OPENGL_ES ?

  • I don't, but as I was looking for it, I found this, from a cocos2d-x (game library) - Qt compatibility layer header:

    @#define glClearDepthf glClearDepth@

    which looks suspicious, to say the least. I'm sure that's part of the problem.

    Thanks for taking the time to help me out!

Log in to reply