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. <GL/gl.h> not found in Linux
Forum Updated to NodeBB v4.3 + New Features

<GL/gl.h> not found in Linux

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 6 Posters 70.8k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #7

    Hi and welcome to devnet,

    What version of Qt did you install on your machine ?

    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
    • S Offline
      S Offline
      Stephan1001
      wrote on last edited by Stephan1001
      #8

      Hi,
      Thanks for the response. From the standard Mint repositories, I installed this version:

      • Qt Creator 3.5.1

      • Based on Qt 5.5.1 (GCC 5.2.1 20151129, 64 bit)

      I notice that the error I get is slightly different from the one at the top of the topic: fatal error: QtOpenGL: No such file or directory but it appears to be related.

      Regards,
      Stephan

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

        I meant Qt itself not Qt Creator.

        If you didn't use the Qt installer then you should check the Qt 5 packages that you have installed in Ming. You might be missing some of them.

        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
        • S Offline
          S Offline
          Stephan1001
          wrote on last edited by
          #10

          ah, sorry. I found this in the software manager:
          Qt5-default: 5.5.1+dfsg-16ubuntu7.2
          Libqt5qml5: 5.5.1-2ubuntu6
          Libqt5quick5: 5.5.1-2ubuntu6

          is this what you meant? Or can I run a command that reveals the correct version?

          regards,
          Stephan

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

            Then it's Qt 5.5.1.

            I don't know if Mint does any customisation for the packaging however AFAIK, from the ubuntu repo, you should install qt5-default which should install the basics for Qt 5 development.

            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
            1
            • S Offline
              S Offline
              Stephan1001
              wrote on last edited by
              #12

              I see that someone else had a similar problem with the mint version: https://forum.qt.io/topic/77370/problems-running-opengl-libraries/5
              I will try the installer from the website tomorrow.
              Thanks

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Stephan1001
                wrote on last edited by
                #13

                Hi,
                I installed QT from the website, now the OpenGL example compiles without problems --> The Mint people seem to have packaged QT incorrectly.
                I do however get this warning when running the OpenGL example "boxes"

                This demo can be GPU and CPU intensive and may
                work poorly or not at all on your system.

                Is this a general warning? My system is capable enough, core i7 with nvidia gtx770

                Well, seems my problem is solved,
                Thanks, regards,
                Stephan

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

                  What drivers are you using for your card ? The binary from nVidia ?

                  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
                  • S Offline
                    S Offline
                    Stephan1001
                    wrote on last edited by
                    #15

                    yes, the binary drivers, version 375.39 from the Mint repository :-)
                    the example runs smooth and the CPU load is below 5%. The compile output suggests that OpenGL is working:
                    22:57:54: Starting: "/usr/bin/make"
                    gcc -c -pipe -g -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../boxes -I. -I/home/stephan/QT/5.8/gcc_64/include -I/home/stephan/QT/5.8/gcc_64/include/QtOpenGL -I/home/stephan/QT/5.8/gcc_64/include/QtWidgets -I/home/stephan/QT/5.8/gcc_64/include/QtGui -I/home/stephan/QT/5.8/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/stephan/QT/5.8/gcc_64/mkspecs/linux-g++ -o fbm.o ../boxes/3rdparty/fbm.c
                    g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../boxes -I. -I/home/stephan/QT/5.8/gcc_64/include -I/home/stephan/QT/5.8/gcc_64/include/QtOpenGL -I/home/stephan/QT/5.8/gcc_64/include/QtWidgets -I/home/stephan/QT/5.8/gcc_64/include/QtGui -I/home/stephan/QT/5.8/gcc_64/include/QtCore -I. -isystem /usr/include/libdrm -I/home/stephan/QT/5.8/gcc_64/mkspecs/linux-g++ -o glbuffers.o ../boxes/glbuffers.cpp

                    and so on. Exits without warnings.

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

                      Don't worry for that warning, it's a message that's currently shown whatever your hardware is. The example itself is pretty old and from a quick look there was a plan to only show it when hardware was underpowered but it seems it didn't happen yet.

                      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
                      • S Offline
                        S Offline
                        Stephan1001
                        wrote on last edited by
                        #17

                        Good to hear. All works well now, including bluetooth (which would have been my next question with the Mint package...)
                        Thanks!

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

                          You're welcome !

                          Happy coding ! :)

                          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
                          • G gilgil

                            Try to install libgl-dev.

                            sudo apt-get install libgl-dev

                            R Offline
                            R Offline
                            rogerCassares
                            wrote on last edited by
                            #19
                            This post is deleted!
                            1 Reply Last reply
                            -1

                            • Login

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