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



  • 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 :)


  • Qt Champions 2016

    @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



  • This post is deleted!

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.