Error when compiling the heartlistener example

  • Hello,
    I want to program a Bluetooth Low Energy (BLE) application. I tried several other APIs for my BLE USB dongle but non of them did really work. Now I want to try the API of Qt.
    So I installed:
    Qt Creator 3.3.0
    Qt 5.4.0 (GCC 4.6.1, 64 bit)

    when I try to compile the heartlistener example I get this compile error:

    g++ -Wl,-rpath,/opt/Qt/5.4/gcc_64 -Wl,-rpath,/opt/Qt/5.4/gcc_64/lib -Wl,-rpath-link,/opt/Qt/5.4/gcc_64/lib -o heartlistener deviceinfo.o heartrate.o main.o qrc_resources.o moc_deviceinfo.o moc_heartrate.o -L/opt/Qt/5.4/gcc_64/lib -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Bluetooth -lQt5DBus -lQt5Core -lGL -lpthread

    /usr/bin/ld: cannot find -lGL
    collect2: error: ld returned 1 exit status
    make: *** [heartlistener] Error 1

    I searched several hours on the web, but couldn't find any solutions for this problem.
    So if somebody could help me I would be really thankfull

  • Moderators

Log in to reply

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