Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. GLDEBUGPROC symbol not defined
Qt 6.11 is out! See what's new in the release blog

GLDEBUGPROC symbol not defined

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marco.beninca71
    wrote on last edited by
    #1

    Hello everybody
    I'm trying to compile a project using Qt 5.11 on a Mac with Mac OS High Sierra v. 10.13.
    In one of my header file I include

    #include <QOpenGLContext>

    While compiling with clang_64 I got the following error:

    In file included from /Library/Qt/5.11/5.11.1/clang_64/lib/QtGui.framework/Headers/QOpenGLContext:1:
    In file included from /Library/Qt/5.11/5.11.1/clang_64/lib/QtGui.framework/Headers/qopenglcontext.h:61:
    /Library/Qt/5.11/5.11.1/clang_64/lib/QtGui.framework/Headers/qopenglversionfunctions.h:1089:23: error: unknown type name 'GLDEBUGPROC'
    QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);

    I saw that this symbol is defined inside the file qopenglext.h. I tried to include it before QOpenGLContext but nothing changed.

    Actually the only way to avoid this error is to manually define the symbol on my header

    typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);

    #include <QOpenGLContext>

    This way everything compiles fine.

    Note that the same code (without the manual typedef) compile perfectly under Windows 10 with Visual Studio 2017 compiler.

    Thanks in advance
    Marco

    1 Reply Last reply
    0
    • AndySA Offline
      AndySA Offline
      AndyS
      Moderators
      wrote on last edited by
      #2

      Hi @marco-beninca71,

      I have not seen this personally and I am using XCode 9.4 on macOS 10.13. Which version of XCode are you using here? Can you provide a minimal example to reproduce this?

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        marco.beninca71
        wrote on last edited by
        #3

        Hi @AndyS
        trying to recreate the issue on a small project I found out that it was a matter of includes sequence. Putting <QOpenGLContext> as first include everything works fine. In my original project I have many libraries involved with a lot of boost and Qt includes inside precompiled headers. So I didn't investigate deeply which is the include generating the issue.
        Thanks for your help
        Marco

        1 Reply Last reply
        0
        • AndySA Offline
          AndySA Offline
          AndyS
          Moderators
          wrote on last edited by
          #4

          HI @marco-beninca71,

          I am glad it is solved. The trick is to always include Qt includes first, so it could have been just a case of that. Can you mark this as solved as this is solved for you now?

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

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved