OpenWrt Forum Archive

Topic: [Pbm] Compiling using non standard librairies ( libbluetooth)

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I'm trying to develop a little soft using the libbluetooth.
I never had problems cross-compiling my elder programs ("hello world"s like) with trunk/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc but now I'm including <bluetooth/bluetooth.h>, <bluetooth/sdp.h> and so on...
I sym-linked the /usr/include/bluetooth in the staging_dir_mipsel/include
I tried to copy the libbluetooth.so.1.0.24 from OpenWRT to staging_dir_mipsel/lib (using different names like libbluetooth.so, libbluetooth.so.0, libbluetooth.so.1)

and then I try :

trunk/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -o foo -lbluetooth bt1.c

I get that sdp_connect() (a function defined in <bluetooth/sdp.h>) is unknown.

I had this kind of error using "standard" gcc without the option -lbluetooth and my code perfectly compile with gcc -o foo -lbluetooth bt1.c

I know I'm still a total rookie in cross-compiling and I've surely made a lot of errors and beg desperatly for help if someone has any idea.


Thanks

(PS: I apologize for my poor English and cross-compiling knowledge)

I tried that :

15:12 typx@poseidon ~% file libbluetooth.so.1.0.24
libbluetooth.so.1.0.24: ELF 32-bit LSB shared object, MIPS, version 1 (SYSV), corrupted section header size

So I suppose that I can't use this library, the question is then how do I create a valid lib for the compilation

It's solved! \o/

I explain it if it interests someone :

first I checked out the packages branch of the svn

#checking out the packages branch of the svn
cd svn/kamikaze
svn co https://svn.openwrt.org/openwrt/packages/
#compiling
make package/symink
make package/bluez-libs-clean
make package/bluez-libs-prepare
make package/bluez-libs-compile
make package/bluez-libs-install

So the library was compiled and added in staging_dir_mipsel/usr/lib

Then using -L path/to/staging_dir_mipsel/usr/lib it perfectly worked!

Thanks a lot for your wonderfull OS

(Last edited by TypX on 19 Jun 2007, 15:35)

The discussion might have continued from here.