Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Compiling Error: /usr/bin/ld: cannot find -lGL When I try to do something wit OpenGL
Forum Update on Monday, May 27th 2025

Compiling Error: /usr/bin/ld: cannot find -lGL When I try to do something wit OpenGL

Scheduled Pinned Locked Moved Unsolved Game Development
3 Posts 3 Posters 1.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.
  • M Offline
    M Offline
    Martin Ziegler
    wrote on 2 Jan 2017, 18:10 last edited by
    #1

    Hello Guys, I wanted to do something with OpenGL, but theres a unique error, which i didn't find through the whole web.

    C++ Programs with simple windows don't make any problems.

    I'm using Linux Mint 18.1

    It would be great, if someone can help me :)

    Compile Output:

    18:54:19: Running steps for project OpenGL-ErsteSchritte...
    18:54:19: Starting: "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" '/data/Lokal/Auslagerung Home Jean/Programme/QT-Programme/OpenGL-ErsteSchritte/OpenGL-ErsteSchritte.pro' -r -spec linux-g++-64 CONFIG+=debug
    18:54:19: The process "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" exited normally.
    18:54:19: Starting: "/usr/bin/make" 
    g++ -m64 -o OpenGL-ErsteSchritte main.o mainwindow.o glwidget.o moc_mainwindow.o    -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread 
    /usr/bin/ld: cannot find -lGL
    Makefile:109: recipe for target 'OpenGL-ErsteSchritte' failed
    collect2: error: ld returned 1 exit status
    make: *** [OpenGL-ErsteSchritte] Error 1
    18:54:19: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project OpenGL-ErsteSchritte (kit: Desktop)
    When executing step "Make"
    18:54:19: Elapsed time: 00:00.
    

    My code is fine so far. (There aren't any other issues)
    Examples have the same error code.

    Have a nice day :)

    K 1 Reply Last reply 2 Jan 2017, 20:29
    0
    • M Martin Ziegler
      2 Jan 2017, 18:10

      Hello Guys, I wanted to do something with OpenGL, but theres a unique error, which i didn't find through the whole web.

      C++ Programs with simple windows don't make any problems.

      I'm using Linux Mint 18.1

      It would be great, if someone can help me :)

      Compile Output:

      18:54:19: Running steps for project OpenGL-ErsteSchritte...
      18:54:19: Starting: "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" '/data/Lokal/Auslagerung Home Jean/Programme/QT-Programme/OpenGL-ErsteSchritte/OpenGL-ErsteSchritte.pro' -r -spec linux-g++-64 CONFIG+=debug
      18:54:19: The process "/usr/lib/x86_64-linux-gnu/qt4/bin/qmake" exited normally.
      18:54:19: Starting: "/usr/bin/make" 
      g++ -m64 -o OpenGL-ErsteSchritte main.o mainwindow.o glwidget.o moc_mainwindow.o    -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread 
      /usr/bin/ld: cannot find -lGL
      Makefile:109: recipe for target 'OpenGL-ErsteSchritte' failed
      collect2: error: ld returned 1 exit status
      make: *** [OpenGL-ErsteSchritte] Error 1
      18:54:19: The process "/usr/bin/make" exited with code 2.
      Error while building/deploying project OpenGL-ErsteSchritte (kit: Desktop)
      When executing step "Make"
      18:54:19: Elapsed time: 00:00.
      

      My code is fine so far. (There aren't any other issues)
      Examples have the same error code.

      Have a nice day :)

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 2 Jan 2017, 20:29 last edited by
      #2

      @Martin-Ziegler said in Compiling Error: /usr/bin/ld: cannot find -lGL When I try to do something wit OpenGL:

      I wanted to do something with OpenGL, but theres a unique error, which i didn't find through the whole web.

      Really? That's strange. They don't make the web as they used to.
      Joke aside, you need to install the OpenGL development package from your distribution, e.g. look here: http://stackoverflow.com/questions/18406369/qt-cant-find-lgl-error

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1
      • X Offline
        X Offline
        xxxxxx
        wrote on 3 Jan 2017, 22:03 last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        2/3

        2 Jan 2017, 20:29

        • Login

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