labapart / gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices
http://labapart.com/
461 stars 161 forks source link

read_wirte example code problem #24

Closed louiske0911 closed 7 years ago

louiske0911 commented 7 years ago

i dont know why hava the following error(I use bluez 5.41) :

arm-linux-gnueabihf-g++ -L/home/ekeroc/rpi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/lib -L/home/ekeroc/rpi -L/home/ekeroc/gattlib/bluez -L/home/ekeroc/gattlib -L/home/ekeroc/rpi/bluetooth -L/home/ekeroc/wiringPi/wiringPi -pthread -lrt -lm -o "Pi3" ./src/Pi3.o -lwiringPi -lpthread -lcrypt ./src/Pi3.o: In function main': /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:123: undefined reference togattlib_string_to_uuid' makefile:45: recipe for target 'Pi3' failed /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:128: undefined reference to gattlib_connect' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:136: undefined reference togattlib_read_char_by_uuid' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:144: undefined reference to gattlib_write_char_by_uuid' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:148: undefined reference togattlib_disconnect'

plz help me ...

oliviermartin commented 7 years ago

You forgot to add gattlib static or dynamic library to your command line.