Error after installing Qt [Solved]



  • I have just installed Qt 5.3 in /opt and started a simple "Qt application with widgets" with QtCreator.

    Compilation fails with
    cannot find -lGL
    Do I have th libGL library : yes
    #locate libGL.so
    /usr/lib/i386-linux-gnu/mesa/libGL.so.1
    /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
    /usr/lib/nvidia-331/libGL.so
    /usr/lib/nvidia-331/libGL.so.1
    /usr/lib/nvidia-331/libGL.so.331.38
    /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
    /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
    /usr/lib32/nvidia-331/libGL.so
    /usr/lib32/nvidia-331/libGL.so.1
    /usr/lib32/nvidia-331/libGL.so.331.38

    /usr/lib/x86_64-linux-gnu/mesa/ was not in the search path of ld so I added
    /usr/lib/x86_64-linux-gnu/mesa/ to /etc/ld.so.conf.d/x86_64-linux-gnu_GL.conf

    now /usr/lib/x86_64-linux-gnu/mesa is in the ld search path :
    #ldconfig -v 2>/dev/null | grep -v ^$'\t'
    /usr/lib/x86_64-linux-gnu/libfakeroot:
    /lib/i386-linux-gnu:
    /usr/lib/i386-linux-gnu:
    /usr/local/lib:
    /lib/x86_64-linux-gnu:
    /usr/lib/x86_64-linux-gnu:
    /usr/lib/x86_64-linux-gnu/mesa-egl:
    /usr/lib/nvidia-331:
    /usr/lib32/nvidia-331:
    /usr/lib/x86_64-linux-gnu/mesa:
    /lib32:
    /usr/lib32:
    /lib:
    /usr/lib:
    /usr/lib/i386-linux-gnu/sse2: (hwcap: 0x0000000004000000)
    /usr/lib/nvidia-331/tls: (hwcap: 0x8000000000000000)
    /usr/lib32/nvidia-331/tls: (hwcap: 0x8000000000000000)

    but still can't link.
    Any advice ?

    TIA

    Alain


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Please search through the forum, this question has been asked many times. You are missing the OpenGL development package



  • Thanks.

    The solution posted at https://qt-project.org/forums/viewthread/13595 solved the problem.

    Alain


Log in to reply
 

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