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. Qt6 missing typedefs for primitive types
Forum Updated to NodeBB v4.3 + New Features

Qt6 missing typedefs for primitive types

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 879 Views 1 Watching
  • 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.
  • D Offline
    D Offline
    Desperado17
    wrote on last edited by Desperado17
    #1

    Greetings,

    I try to build a Qt6 application on an Ubuntu 22.04 Desktop system according to this:

    https://doc.qt.io/qt-6/qopenglwidget.html

    But I get undefined errors:

    In file included from /usr/include/x86_64-linux-gnu/qt6/QtGui/qopengl.h:146,
    from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/qopenglwidget.h:47,
    from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/QOpenGLWidget:1,
    <ourinternalfiles>
    /usr/include/x86_64-linux-gnu/qt6/QtGui/qopenglext.h:235:67: error: ‘GLdouble’ has not been declared
    235 | typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);

    Same for other type like GLshort etc.

    Any idea what that might be?

    Regards

    sierdzioS 1 Reply Last reply
    0
    • D Desperado17

      @Christian-Ehrlicher That's why I'm asking.

      As far as I can tell the widget depends on qopengl.h which depends on QT_FEATURE_opengles3=ON to include the headers:

      https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/opengl/qopengl.h#n42

      I assume QT_FEATURE_opengles3 is only intended for compiling qt not for the client application, is it?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #9

      @Desperado17 correct. You have to compile Qt accordingly.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • D Desperado17

        Greetings,

        I try to build a Qt6 application on an Ubuntu 22.04 Desktop system according to this:

        https://doc.qt.io/qt-6/qopenglwidget.html

        But I get undefined errors:

        In file included from /usr/include/x86_64-linux-gnu/qt6/QtGui/qopengl.h:146,
        from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/qopenglwidget.h:47,
        from /usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/QOpenGLWidget:1,
        <ourinternalfiles>
        /usr/include/x86_64-linux-gnu/qt6/QtGui/qopenglext.h:235:67: error: ‘GLdouble’ has not been declared
        235 | typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s);

        Same for other type like GLshort etc.

        Any idea what that might be?

        Regards

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        @Desperado17 you are likely missing OpenGL dev package. Try installing something like mesa-common-dev or some similar package.

        (Z(:^

        D 1 Reply Last reply
        1
        • sierdzioS sierdzio

          @Desperado17 you are likely missing OpenGL dev package. Try installing something like mesa-common-dev or some similar package.

          D Offline
          D Offline
          Desperado17
          wrote on last edited by
          #3

          @sierdzio So far I tried adding libgl1-mesa-dev, libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev mesa-common-dev libxcb-glx0-dev, freeglut3-dev

          Not enough.

          D 1 Reply Last reply
          0
          • D Desperado17

            @sierdzio So far I tried adding libgl1-mesa-dev, libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev mesa-common-dev libxcb-glx0-dev, freeglut3-dev

            Not enough.

            D Offline
            D Offline
            Desperado17
            wrote on last edited by
            #4

            @Desperado17 Some more info: I try to combine Qt with Magnum https://github.com/mosra/magnum and the whole application is configured for OpenGL ES. It seems that Qt still pulls the desktop GL headers while Magnum pulls the lightweight GLES headers.

            Is there any way to configure Qt for desktop so that it only pulls GLES headers?

            sierdzioS 1 Reply Last reply
            0
            • D Desperado17

              @Desperado17 Some more info: I try to combine Qt with Magnum https://github.com/mosra/magnum and the whole application is configured for OpenGL ES. It seems that Qt still pulls the desktop GL headers while Magnum pulls the lightweight GLES headers.

              Is there any way to configure Qt for desktop so that it only pulls GLES headers?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #5

              @Desperado17 said in Qt6 missing typedefs for primitive types:

              Is there any way to configure Qt for desktop so that it only pulls GLES headers?

              Yes.

              In Qt 5, you have to compile Qt yourself and specify correct open gl version.

              In Qt 6 I am not entirely sure. It should be dynamic, settable by QRhi but I am not sure if this applies to QOpenGLWidget. Perhaps it will be enough to call https://doc.qt.io/qt-6/qsurfaceformat.html#setDefaultFormat

              (Z(:^

              D 1 Reply Last reply
              0
              • sierdzioS sierdzio

                @Desperado17 said in Qt6 missing typedefs for primitive types:

                Is there any way to configure Qt for desktop so that it only pulls GLES headers?

                Yes.

                In Qt 5, you have to compile Qt yourself and specify correct open gl version.

                In Qt 6 I am not entirely sure. It should be dynamic, settable by QRhi but I am not sure if this applies to QOpenGLWidget. Perhaps it will be enough to call https://doc.qt.io/qt-6/qsurfaceformat.html#setDefaultFormat

                D Offline
                D Offline
                Desperado17
                wrote on last edited by
                #6

                @sierdzio Will QSurfaceFormat::setDefaultFormat influence the headers pulled?

                Christian EhrlicherC 1 Reply Last reply
                0
                • D Desperado17

                  @sierdzio Will QSurfaceFormat::setDefaultFormat influence the headers pulled?

                  Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #7

                  @Desperado17 said in Qt6 missing typedefs for primitive types:

                  QSurfaceFormat::setDefaultFormat influence the headers pulled?

                  No, how should it?

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  D 1 Reply Last reply
                  0
                  • Christian EhrlicherC Christian Ehrlicher

                    @Desperado17 said in Qt6 missing typedefs for primitive types:

                    QSurfaceFormat::setDefaultFormat influence the headers pulled?

                    No, how should it?

                    D Offline
                    D Offline
                    Desperado17
                    wrote on last edited by
                    #8

                    @Christian-Ehrlicher That's why I'm asking.

                    As far as I can tell the widget depends on qopengl.h which depends on QT_FEATURE_opengles3=ON to include the headers:

                    https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/opengl/qopengl.h#n42

                    I assume QT_FEATURE_opengles3 is only intended for compiling qt not for the client application, is it?

                    Christian EhrlicherC 1 Reply Last reply
                    0
                    • D Desperado17

                      @Christian-Ehrlicher That's why I'm asking.

                      As far as I can tell the widget depends on qopengl.h which depends on QT_FEATURE_opengles3=ON to include the headers:

                      https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/opengl/qopengl.h#n42

                      I assume QT_FEATURE_opengles3 is only intended for compiling qt not for the client application, is it?

                      Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #9

                      @Desperado17 correct. You have to compile Qt accordingly.

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      0
                      • D Desperado17 has marked this topic as solved on

                      • Login

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