Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error when compiling the heartlistener example
Qt 6.11 is out! See what's new in the release blog

Error when compiling the heartlistener example

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 827 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tecnova
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      http://qt-project.org/forums/viewthread/37596
      http://qt-project.org/forums/viewthread/43593
      http://qt-project.org/forums/viewthread/36866/

      Should work for Qt 5.4.0 too.

      157

      1 Reply Last reply
      0

      • Login

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