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. "/usr/bin/ld: cannot find -lGL" impossible to compile a Qt project
Forum Updated to NodeBB v4.3 + New Features

"/usr/bin/ld: cannot find -lGL" impossible to compile a Qt project

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 7 Posters 5.1k Views 4 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
    #4

    How did you install Qt ?

    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
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #5

      Hi
      On ubuntu i had to do
      sudo apt-get install mesa-common-dev
      to get the actual headers.

      1 Reply Last reply
      1
      • WotanW Offline
        WotanW Offline
        Wotan
        wrote on last edited by
        #6

        The package mesa-common-dev is already install on my computer.
        And I installed Qt trough the installer for linux qt-unified-linux-x64-3.0.4-online.run

        jsulmJ 1 Reply Last reply
        0
        • WotanW Wotan

          The package mesa-common-dev is already install on my computer.
          And I installed Qt trough the installer for linux qt-unified-linux-x64-3.0.4-online.run

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #7

          @Wotan See here: https://doc.qt.io/qt-5/linux.html
          You need to install

          sudo apt-get install build-essential libgl1-mesa-dev
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply
          5
          • WotanW Offline
            WotanW Offline
            Wotan
            wrote on last edited by
            #8

            jsulm : it is already installed ...

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

              What graphic stack do you have 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
              • WotanW Offline
                WotanW Offline
                Wotan
                wrote on last edited by
                #10

                SGaist : What do you mean ? What is a graphic stack ?

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

                  Graphics card, driver, etc.

                  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
                  • WotanW Offline
                    WotanW Offline
                    Wotan
                    wrote on last edited by
                    #12

                    My graphic card is a "GeForce GTX 1060 6GB"
                    The driver I installed is "NVIDIA-Linux-x86_64-390.42.run"
                    I hope it helped ...

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

                      Did you check the related libraries ? Where are they installed ?

                      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
                      • SifuS Offline
                        SifuS Offline
                        Sifu
                        wrote on last edited by
                        #14

                        @Wotan said in "/usr/bin/ld: cannot find -lGL" impossible to compile a Qt project:

                        GL

                        Run the following command in shell and see if the libraries installed or not in your computer

                        ldconfig -v | grep -i GL

                        The library you are looking will be libGL.so . If it is not there install it as follows,

                        sudo apt-get install libgl1 -y

                        That will probably fix this issue.

                        1 Reply Last reply
                        2
                        • jsulmJ jsulm

                          @Wotan See here: https://doc.qt.io/qt-5/linux.html
                          You need to install

                          sudo apt-get install build-essential libgl1-mesa-dev
                          
                          M Offline
                          M Offline
                          Monolith
                          wrote on last edited by
                          #15

                          @jsulm Thanks your so much. Problem solved

                          Pablo J. RoginaP 1 Reply Last reply
                          0
                          • M Monolith

                            @jsulm Thanks your so much. Problem solved

                            Pablo J. RoginaP Offline
                            Pablo J. RoginaP Offline
                            Pablo J. Rogina
                            wrote on last edited by
                            #16

                            @monolith said in "/usr/bin/ld: cannot find -lGL" impossible to compile a Qt project:

                            Problem solved

                            so please mark your post as such! Thanks.

                            Upvote the answer(s) that helped you solve the issue
                            Use "Topic Tools" button to mark your post as Solved
                            Add screenshots via postimage.org
                            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                            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