Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Qt 5.0.1 and glext.h

    General and Desktop
    2
    19
    10644
    Loading More Posts
    • 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
      kmt11 last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • K
          kmt11 last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • K
              kmt11 last edited by

              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 Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • K
                  kmt11 last edited by

                  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 Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    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 Reply Quote 0
                    • K
                      kmt11 last edited by

                      Yes, most certainly

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        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 Reply Quote 0
                        • K
                          kmt11 last edited by

                          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 Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            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 Reply Quote 0
                            • K
                              kmt11 last edited by

                              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 Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                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 Reply Quote 0
                                • K
                                  kmt11 last edited by

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

                                  1 Reply Last reply Reply Quote 0
                                  • SGaist
                                    SGaist Lifetime Qt Champion last edited by

                                    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 Reply Quote 0
                                    • K
                                      kmt11 last edited by

                                      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 Reply Quote 0
                                      • K
                                        kmt11 last edited by

                                        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 Reply Quote 0
                                        • SGaist
                                          SGaist Lifetime Qt Champion last edited by

                                          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 Reply Quote 0
                                          • First post
                                            Last post