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 Creator error: /usr/lib/ld: cannot find -lGL

Qt Creator error: /usr/lib/ld: cannot find -lGL

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 976 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.
  • C Offline
    C Offline
    Chel-iz-OMONa
    wrote on 5 Jul 2020, 19:39 last edited by
    #1

    Qt Creator gives an error message: /usr/lib/ld: cannot find -lGL

    19:06:04: The steps for the 'Test' project are performed.
    19:06:04: The settings was not changed, stage qmake is skipped.
    19:06:04: Starting: «/usr/bin/make» -j2
    g++ -Wl,-rpath,/home/chelizomona/Programs/QtCreator/5.15.0/gcc_64/lib -o Test main.o mainwindow.o moc_mainwindow.o   /home/chelizomona/Programs/QtCreator/5.15.0/gcc_64/lib/libQt5Widgets.so /home/chelizomona/Programs/QtCreator/5.15.0/gcc_64/lib/libQt5Gui.so /home/chelizomona/Programs/QtCreator/5.15.0/gcc_64/lib/libQt5Core.so -lGL -lpthread   
    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [Makefile:247: Test] Error 1
    19:06:04: The process «/usr/bin/make» ended with code 2.
    Build/Deploy Error "Test" project (Kit: Desktop Qt 5.15.0 GCC 64bit)
    During the execution of the «Build»
    19:06:04: Time passed: 00:01.
    

    The package libgl1-mesa-dev is installed and the file libGL.so.1 in /usr/lib/, but Qt Creator doesn't see him((

    P.S.: Sorry for my English, i don't know him very well

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 5 Jul 2020, 19:50 last edited by mrjj 7 May 2020, 19:53
      #2

      Hi and welcome to the forums

      What linux is it ?
      On newer ubuntu sometimes we need to use ln create a soft link

      https://stackoverflow.com/questions/18406369/qt-cant-find-lgl-error
      the destan asnwer

      something like
      sudo ln -s /usr/lib/libEGL1.so /usr/lib/libGL.so

      I hope its readable you :)

      1 Reply Last reply
      1
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 5 Jul 2020, 21:08 last edited by
        #3

        Hi and welcome to devnet,

        You are still missing libGl.so

        Depending on your version of Debian, you should also install libglvnd-dev.

        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
        2

        1/3

        5 Jul 2020, 19:39

        • Login

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