Reputation: 297
Hi I'm trying to use bluez
source code to control some stuff in my code.
In my cmake I first start doing instruction like
include_directories(${CMAKE_SOURCE_DIR}/../bluez/attrib/)
then
aux_source_directory(${CMAKE_SOURCE_DIR}/../bluez/attrib/ SRC_BLUEZ_ATTRIB_LIST)
and finaly add SRC_BLUEZ_ATTRIB_LIST
to my add_executable
But I still have
undefined reference to gatt_connect(char const*, char const*, char const*, char const*, int, int, void (*)(_GIOChannel*, _GError*, void*), _GError**)
Any suggestion?
Upvotes: 0
Views: 258
Reputation: 10185
Use extern "C" in your c++
source file
extern "C" {
#include "gatttool.h"
}
Upvotes: 1