Important: Please read the Qt Code of Conduct -

[solved] QOpenGLFunctions with specific version on Windows with Qt 5.3

  • I opened the OpenGLWindow example and replaced the QOpenGLFunctions with QOpenGLFunctions_3_2_Core/Compatibility. As a result, I am getting the following error message:

    "error: C2504: 'QOpenGLFunctions_3_2_Compatibility' : base class undefined"

    Upon further investigation, it turns out that the problem lies here:

    #if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)

    Apparently, the condition is false and the class is not being defined. How do I fix this problem?

  • This seems to be a Windows specific problem. I have managed to get equivalent code to run under MacOSX10.9. I wonder what is going on?

  • Moderators

    Hi, welcome to devnet.
    Did you use the ANGLE version of Qt by any chance? It only supports OpenGL ES 2 set and not the higher core profiles.

  • Hm, I don't think I installed the ANGLE version, at least not consciously. I simply used the default Qt online installer of the community edition. How do I verify I have the right version installed?

  • Moderators

    Go to the Qt installation directory and run MaintenanceTool.exe. Select Packages and expand the Qt 5.3 branch. You will see about a dozen of different versions there. See which one you have selected. The msvc* ones without "OpenGL" at the end are ANGLE builds.

  • Spot on, that was it. Thank you for the help!

Log in to reply