I downloaded the following package : https://github.com/labapart/gattlib for discovery of BLE device, I could discover the devices using the commands specified on the link, however, now I want to use this code to develop my own application. I tried implementing this on Qt. I copied the BLE scan code in a .c file and below is my .pro file:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
QT += BluezQt
SOURCES += \
ble_scan.c
packagesExist(glib-2.0) {
CONFIG += link_pkgconfig
PKGCONFIG += glib-2.0
}

LIBS += -pthread
LIBS += -lbluetooth
LIBS += -L/gattlib_0.2_x86_64/lib/pkgconfig
HEADERS += \
gattlib.h

However, I keep on getting following errors:
undefined reference to ''gattlib_connect'
and other functions which are defined in gattlib.

I think this has something to do with the package, could anyone please guide me on how to include this in Qt project. (I tried using cmake instead of qmake but it doesn't give any .pro file to add glib and bluetooth library, hence couldn't use it)