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 6: cannot find -lOpenGL
Forum Updated to NodeBB v4.3 + New Features

Qt 6: cannot find -lOpenGL

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 7 Posters 9.6k 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.
  • F Offline
    F Offline
    fem_dev
    wrote on last edited by
    #1

    I have a Qt C++ application that compiles Ok with Qt 5.15.0, but, when I switch to Qt 6.0.0 I got this compile time error:

    cannot find -lOpenGL
    

    So, I tried to install again this package:

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

    And use locate to show the installed files:

    locate libOpenGL
    /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so
    /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
    /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
    /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so
    /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
    /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
    /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so
    /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
    /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
    

    But I got the same error again....

    What is wrong with Qt 6 setup?

    My system:

    • Ubuntu 20.04 x64
    • Qt Creator IDE 4.14.0
    O S 2 Replies Last reply
    1
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

      R 1 Reply Last reply
      2
      • JoeCFDJ JoeCFD

        sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

        R Offline
        R Offline
        rtnf_
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • F fem_dev

          I have a Qt C++ application that compiles Ok with Qt 5.15.0, but, when I switch to Qt 6.0.0 I got this compile time error:

          cannot find -lOpenGL
          

          So, I tried to install again this package:

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

          And use locate to show the installed files:

          locate libOpenGL
          /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so
          /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
          /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
          /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so
          /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
          /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
          /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so
          /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
          /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
          

          But I got the same error again....

          What is wrong with Qt 6 setup?

          My system:

          • Ubuntu 20.04 x64
          • Qt Creator IDE 4.14.0
          O Offline
          O Offline
          ondrej3074
          wrote on last edited by
          #4

          @fem_dev For my case this solution work's perfectly. Thanks !

          1 Reply Last reply
          0
          • F fem_dev

            I have a Qt C++ application that compiles Ok with Qt 5.15.0, but, when I switch to Qt 6.0.0 I got this compile time error:

            cannot find -lOpenGL
            

            So, I tried to install again this package:

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

            And use locate to show the installed files:

            locate libOpenGL
            /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so
            /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
            /snap/gnome-3-34-1804/36/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
            /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so
            /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
            /snap/gnome-3-34-1804/60/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
            /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so
            /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0
            /snap/kde-frameworks-5-core18/32/usr/lib/x86_64-linux-gnu/libOpenGL.so.0.0.0
            

            But I got the same error again....

            What is wrong with Qt 6 setup?

            My system:

            • Ubuntu 20.04 x64
            • Qt Creator IDE 4.14.0
            S Offline
            S Offline
            shampletov_no
            wrote on last edited by
            #5

            @fem_dev Thanks, in my case It works too

            1 Reply Last reply
            0
            • B Offline
              B Offline
              booter
              wrote on last edited by
              #6

              error build : cannot find -lgl

              ++++++++++++++++++

              sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

              Thank you all!

              jsulmJ 1 Reply Last reply
              0
              • B booter

                error build : cannot find -lgl

                ++++++++++++++++++

                sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

                Thank you all!

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

                @booter Do you have a question?
                If you get this error - did you install the packages mentioned in this thread?

                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