[SOLVED] compile error: "/usr/bin/ld: cannot find -lGL" after Fresh install of Qt 5.3 on new system



  • Operating Environment
    Qt 5.3.1
    Qt Creator 3.1.2
    RHEL 7.0

    Getting the following compile error output.

    3:46:34: Running steps for project bits...
    13:46:34: Configuration unchanged, skipping qmake step.
    13:46:34: Starting: "/usr/bin/make"
    g++ -Wl,-rpath,/home/tcamuso/Qt/5.3/gcc_64 -Wl,-rpath,/home/tcamuso/Qt/5.3/gcc_64/lib -o bits main.o hexedit.o bits.o bitfield.o BitButton.o shiftop.o formatgroup.o moc_bits.o moc_BitButton.o moc_hexedit.o moc_shiftop.o moc_formatgroup.o -L/home/tcamuso/Qt/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [bits] Error 1
    13:46:34: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project bits (kit: Desktop Qt 5.3 GCC 64bit)
    When executing step 'Make'
    13:46:34: Elapsed time: 00:00.

    Obviously I'm missing the libGL file. I tried ...
    $ cp /usr/lib64/libGL.so.1 /home/tcamuso/Qt/5.3/gcc_64/lib/.
    ... but no joy.

    I've installed Qt on other systems/OS before (W32, W64, Fedora, Ubuntu) and never encountered this problem.

    Any ideas?


  • Lifetime Qt Champion

    Hi,

    This question has been asked many times, please search the forum first. You are missing the OpenGL development package.



  • Yes. that was it. THANKS!

    For anyone else on RHEL7/CentOS7 ...
    @

    yum install ghc-OpenGL-devel.x86_64

    @
    ... did it for me.


  • Lifetime Qt Champion

    You're welcome !

    Since you have OpenGL working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)



  • Done, and thanks again!


Log in to reply
 

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