Quote:
Originally Posted by jhwilliams
You could install a library whose bytecode was "0000" to your PC. It wouldn't do anything, but you could install it. So too can you install ARM libraries that don't do anything on your PC, but do on the target architecture.
If you've cross compiled the bluetooth libs for ARM, just copy them to the appropriate directory in which your ARM compiler looks for libaries via the -l flag.
cp /path/to/arm/bluetoothlib/libbluez.so /path/to/arm/ld/library/path/libbluez.so
|
[root@feiyinziiu lib]# pwd
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib
haha!.Thank you very much.I have solve the problem under your guiding.
I found it difficult for me to get the path of the arm-linux-gcc looks for libraries via the -l flag.
But,the other day ,I have completed a programm with the pthread.
# arm-linux-gcc -o xxx xxx.c -lpthread
it work correctly.
so,I turn to find the pthread.
# locate pthread
/usr/lib/libgpgme++-pthread.so.1.0.0
/usr/lib/libgpgme-pthread.so.11
/usr/lib/libgpgme-pthread.so.11.6.4
/usr/lib/libpthread.a
/usr/lib/libpthread.so
/usr/lib/libpthread_nonshared.a
/usr/lib/kde4/devel/libgpgme++-pthread.so
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/bits/pthreadtypes.ph
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/libpthread-2.8.so
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/lib/libpthread.so.0
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libpthread.a
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libpthread.so
/usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/armv4t/usr/lib/libpthread_nonshared.a
finally,I copy the bluetooth lib to the direction.
But I have much doubt about the cross-compiling.
Above all,the bluez-lib has been cross compiled by arm-linux-gcc compiler(Before I transplant the libs,I cross compiled the libs).But I copy the the bluez-lib to that path,when I do tihs:
# arm-linux-gcc -o bluetest bluetest.c -lbluetooth
That is to say,those libs have to be recompiled.
How can the cross compiler recognize the libs?