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. Qt 5.0.1 and glext.h
QtWS25 Last Chance

Qt 5.0.1 and glext.h

Scheduled Pinned Locked Moved General and Desktop
19 Posts 2 Posters 11.5k 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.
  • K Offline
    K Offline
    kmt11
    wrote on last edited by
    #1

    Hi,

    Newbie here, and evaluating QT with a view to deploying it company-wide for app development, including for ios. I am aware that the ios side of QT is some time off, and willing to wait if QT works well on Windows.

    However, I have :

    #include <GL/gl.h>
    #include <GL/glext.h>
    #include <GL/glu.h>

    with the error message :

    fatal error C1083: Cannot open include file: 'GL/glext.h': No such file or directory

    No combination of also including, or substituting <QtOpenGL>, <QGLFormat>, etc seem to work, instead generating over a hundred errors.

    Any advice would be much appreciated.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You might be missing the "glew":http://glew.sourceforge.net/ library

      EDIT:
      Forgot to ask, which version of Qt did you download ?

      As a side note it's Qt, QT stands for Apple's QuickTime :)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kmt11
        wrote on last edited by
        #3

        Hi,

        I stand corrected. Qt it is then.
        What did I download ? Qt 5.0.2 64bit for desktop (MSVC2012)

        Trying to port a 4.8 project on Unix built by my colleague, to my 5.0.2 on windows, and suspect the problem is that he has used legacy opengl.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What could be the most simple is to try Qt 5.1.

          IIRC, there should have been some patches that remove the needs for glew

          Hope it helps

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kmt11
            wrote on last edited by
            #5

            Thanks. Well, I'm just evaluating it with a view to a commercial multi-seat licence, so interested if it is a configuration issue or a simple workaround. Having used many other development packages over the years to develop a variety of apps, I am somewhat disappointed with our experience of Qt to date.

            I'm also trying 4.8 on a Mac, so don't get me started there !

            Nevertheless, I'll persevere, who knows, could be a simple fix.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              On my side, I've been developing with Qt since the version 3 days without major problems.

              Currently on Windows and OS X with the 4.8.X series and it's going quite well. So if you encounter some problem I might be able to help

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kmt11
                wrote on last edited by
                #7

                Thank you for your offer. Seems to be up and running on Mac, after having downloaded multi-Gb to update the OS and update xcode.

                Qt Demo examples compile and run, but a ported project is failing to find GL/gl.h, GL/glext.h, etc.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Do you have QT += opengl in your pro file ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kmt11
                    wrote on last edited by
                    #9

                    Yes, most certainly

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Is it a simple project ? (Meaning one pro file for all)

                      If not check that every other project that uses these class also includes opengl

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kmt11
                        wrote on last edited by
                        #11

                        It is one pro file only.

                        I now notice that, if I try #include <QtOpenGL>, I get "library not found for -IGLU", if that helps.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          I think I found out the first problem (must be sleepy to have been so long...):

                          on mac you have to:

                          @#include <OpenGL/gl.h>@

                          That is: framework_name/filename.h

                          You can surround that with

                          @#ifdef Q_OS_MACX
                          #include <OpenGL/gl.h>
                          #else
                          #include <GL/gl.h>
                          #endif@

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • K Offline
                            K Offline
                            kmt11
                            wrote on last edited by
                            #13

                            Thank you. That seems to have fixed it.

                            Now builds with no errors.

                            The app runs perfectly. Brilliant. You've made my day.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              You're welcome !

                              Don't forget to update your thread's title to solved so other forum users may know that a solution has been found :)

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • K Offline
                                K Offline
                                kmt11
                                wrote on last edited by
                                #15

                                well, the original QT 5 on Windows and glext.h problem isn't solved....

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  IIRC, there's no glext.h by default on windows. But you can get the file "here":http://www.opengl.org/registry/

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kmt11
                                    wrote on last edited by
                                    #17

                                    Got the file thanks. Throwing up an error, but that may be down to internal programming, so will look into that and report back.....

                                    1 Reply Last reply
                                    0
                                    • K Offline
                                      K Offline
                                      kmt11
                                      wrote on last edited by
                                      #18

                                      Seems that trying to use glext.h throws up dozens of errors, and it's simply too much of a pain to sort this. I have to conclude that legacy opengl cannot be used with Qt 5.
                                      Tried reverting to Qt Creator 2.7.1 and Qt 4.8.4 on Windows, but this just refuses to configure a project, and ignores anything set up in the kit options.
                                      Qt 4.8 seems to be fine on Mac and a unix box, but Qt 5 has too many problems for us to think about using it as a future ipad app tool. If it has too many problems on Windows, it gives us no confidence that it will be safe for ios development.

                                      1 Reply Last reply
                                      0
                                      • SGaistS Offline
                                        SGaistS Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        There must be a glitch in QtCreator's configuration.
                                        4.8.4 works pretty well on windows (even custom builds)

                                        Depending on your problem, you might consider contacting Digia to sort things out

                                        Interested in AI ? www.idiap.ch
                                        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