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. error: cannot find -lGL [SOLVED]
Qt 6.11 is out! See what's new in the release blog

error: cannot find -lGL [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k Views 1 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.
  • Z Offline
    Z Offline
    zeroptr
    wrote on last edited by zeroptr
    #1

    Hi all,

    I installed Ubuntu 15.04 amd64 to my virtual machine and qt from the web site's linux online installer..

    I get some errors but I corrected by intalling mesa-dev packages.. then..
    when I create a new qt widgets application or a qtwidgets sample the compiler always says

    : error: cannot find -lGL
    : error: collect2: error: ld returned 1 exit status

    what's wrong I googled this but I cannot find a solution ??

    Linux Mint 20.04 64 Bit QT6.0.1

    1 Reply Last reply
    0
    • joeQJ Offline
      joeQJ Offline
      joeQ
      wrote on last edited by
      #2

      I also encountered the problem. you just run the flowing orders:
      sudo apt-get install libqt4-dev
      or
      sudo apt-get install libgl1-mesa-dev
      or
      libgl1-mesa-dev
      libglu1-mesa-dev
      because your Ubuntu lack of the files.

      Just do it!

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zeroptr
        wrote on last edited by
        #3

        Thanks a lot... after installing libgl1-mesa-dev and libglu1 problem solved...

        Do you recommend any other things to install to my system not to have this king of problems?

        Linux Mint 20.04 64 Bit QT6.0.1

        joeQJ 1 Reply Last reply
        0
        • Z zeroptr

          Thanks a lot... after installing libgl1-mesa-dev and libglu1 problem solved...

          Do you recommend any other things to install to my system not to have this king of problems?

          joeQJ Offline
          joeQJ Offline
          joeQ
          wrote on last edited by
          #4

          @zeroptr
          Not to worry, because of the different systems, we will be missing a different file, when encountering problems, first step search internet, if no solution is found, and then ask.

          Just do it!

          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