Closed louiske0911 closed 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'
main': /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:123: undefined reference to
gattlib_connect' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:136: undefined reference to
gattlib_write_char_by_uuid' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:148: undefined reference to
plz help me ...
You forgot to add gattlib static or dynamic library to your command line.
gattlib
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 to
gattlib_string_to_uuid' makefile:45: recipe for target 'Pi3' failed /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:128: undefined reference togattlib_connect' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:136: undefined reference to
gattlib_read_char_by_uuid' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:144: undefined reference togattlib_write_char_by_uuid' /home/ekeroc/workspace/Pi3/Debug/../src/Pi3.cpp:148: undefined reference to
gattlib_disconnect'plz help me ...