Click here to Skip to main content
15,868,141 members
Home / Discussions / Linux Programming
   

Linux Programming

 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 7:39
Vaclav_5-Mar-19 7:39 
AnswerRe: Developing bluetooth app using "bluez" Pin
k50545-Mar-19 9:44
mvek50545-Mar-19 9:44 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 13:37
Vaclav_5-Mar-19 13:37 
GeneralRe: Developing bluetooth app using "bluez" Pin
k50546-Mar-19 6:57
mvek50546-Mar-19 6:57 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 16:02
Vaclav_5-Mar-19 16:02 
GeneralRe: Developing bluetooth app using "bluez" Pin
k50546-Mar-19 8:50
mvek50546-Mar-19 8:50 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_6-Mar-19 11:58
Vaclav_6-Mar-19 11:58 
QuestionLinking to library Pin
Vaclav_3-Mar-19 5:22
Vaclav_3-Mar-19 5:22 
It looks as I have jumped the gun , again.

This bluetooth "stack" / library named "bluez" is somehow included in OS.
I can get some info about bluetooth devices using "system" calls.

That does not mean it can be used coding in C++.

I need to start from scratch and build the "bluetooth" library
or "bluetoothd".

1. download the latest "Linux stack" bluez-5.18 (?) - done
I am not sure why "they" call it "stack" , but that is not important.
2. follow "readme" and configure "it" (stack?) - partially done
3. run "make" and here I am stuck because it fails....

... tomorrow...















I probably asked this before, but .. here it goes
I have installed "bluetooth" library
apt-get install bluez libbluetooth-dev
and still getting this linker error



C++
C_SPI_LCD.o ./src/MODULES/MODULE_1602/C_SSP.o ./src/MODULES/MODULE_1602/C_gpio.o ./src/VNA_1022_BASE.o -lgomp -lbluetooth -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc-cross/arm-linux-gnueabihf/5/crtend.o /usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/lib/../lib/crtn.o
/usr/lib/gcc-cross/arm-linux-gnueabihf/5/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lbluetooth
makefile:80: recipe for target 'VNAR_19321' failed
collect2: error: ld returned 1 exit status
make: *** [VNAR_19321] Error 1
"make all" terminated with exit code 2. Build might be incomplete.


The Cross G++ Linker has an option "-lbluetooth" but I only specify "bluetooth" , without the "-l"

I did try to locate bluetooth



C++
jim@jim-desktop:~$ find -name "bluetooth"
find: ‘./.cache/dconf’: Permission denied
find: ‘./.dbus’: Permission denied
find: ‘./.config/configstore’: Permission denied
jim@jim-desktop:~$ sudo find -name "bluetooth"
[sudo] password for jim: 
jim@jim-desktop:~$ sudo find -name "*bluetooth"
jim@jim-desktop:~$ sudo find -name "*bluetooth*"
./.local/share/icons/bluetooth-wizard.png
./.local/share/applications/bluetooth-wizard.desktop
./.cache/upstart/indicator-bluetooth.log.5.gz
./.cache/upstart/indicator-bluetooth.log.4.gz
./.cache/upstart/indicator-bluetooth.log.2.gz
./.cache/upstart/indicator-bluetooth.log.3.gz
./.cache/upstart/indicator-bluetooth.log.1.gz
./.cache/upstart/indicator-bluetooth.log.6.gz
./.cache/upstart/indicator-bluetooth.log.7.gz
jim@jim-desktop:~$ 


Here are my questions / comments :

1. apparently the IDE adds the
"-l" to link to library - find with me.

2. Do I have to specify directory using "-L" and how do I find it using Linux?

3. It looks as there are no conventions as far as naming the library - some sources quote "libbluetooth"

Thanks

modified 4-Mar-19 0:53am.

AnswerRe: Linking to library Pin
Richard MacCutchan3-Mar-19 5:53
mveRichard MacCutchan3-Mar-19 5:53 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:08
Vaclav_3-Mar-19 7:08 
AnswerRe: Linking to library Pin
k50543-Mar-19 6:03
mvek50543-Mar-19 6:03 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:09
Vaclav_3-Mar-19 7:09 
AnswerRe: Linking to library Pin
k50543-Mar-19 6:32
mvek50543-Mar-19 6:32 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:05
Vaclav_3-Mar-19 7:05 
AnswerRe: Linking to library Pin
Vaclav_3-Mar-19 7:15
Vaclav_3-Mar-19 7:15 
GeneralRe: Linking to library Pin
k50543-Mar-19 7:44
mvek50543-Mar-19 7:44 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 8:12
Vaclav_3-Mar-19 8:12 
GeneralRe: Linking to library Pin
k50543-Mar-19 9:04
mvek50543-Mar-19 9:04 
GeneralRe: Linking to library Pin
Richard MacCutchan3-Mar-19 21:34
mveRichard MacCutchan3-Mar-19 21:34 
GeneralRe: Linking to library Pin
Vaclav_4-Mar-19 4:28
Vaclav_4-Mar-19 4:28 
GeneralRe: Linking to library Pin
Richard MacCutchan4-Mar-19 4:56
mveRichard MacCutchan4-Mar-19 4:56 
GeneralRe: Linking to library Pin
k50544-Mar-19 7:42
mvek50544-Mar-19 7:42 
GeneralRe: Linking to library Pin
Richard MacCutchan4-Mar-19 9:47
mveRichard MacCutchan4-Mar-19 9:47 
GeneralRe: Linking to library Pin
k50544-Mar-19 12:45
mvek50544-Mar-19 12:45 
GeneralRe: Linking to library Pin
Richard MacCutchan4-Mar-19 21:44
mveRichard MacCutchan4-Mar-19 21:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.