Shared Libary Issue - cannot find library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having issues building and linking a library that I created to another
executable.  Below are the steps that I followed.  NOTE:  I'm building this
project on my computer (Ubuntu Karmic Koala) and then putting it on to an
embedded arm device running busyBox linux.  

Here's the steps that I've gone through that lead me to a dreaded "cannot
find MYLIB.so" when I try and run the application on the embedded device

1: arm-linux-gcc -Wall -fPIC -c MYLIB.c -O3 --sysroot home06 
2: arm-linux-gcc -Wall -shared -Wl,-soname,libMYLIB.so.1 -o libMYLIB.so.1.0
MYLIB.o -O3 --sysroot home06
3: ln -sf libMYLIB.so.1.0 libMYLIB.so //symbolic link for -lMYLIB
4: ln -sf libMYLIB.so.1.0 libMYLIB.so.1 //allows for runtime binding to work
5: arm-linux-gcc -lTXRX -lm -lMYLIB COMM.c -O3 --sysroot home06 -o RUNONBOX

6: ldd RUNONBOX 
>> not a dynamic executable //this doesn't seem good...no reference to
>> MYLIB...  NOTE: I've built this program with -lTXRX and -lm many times
>> before with ZERO issues

7: mput *.so* //put all symbolic links on device NOTE: folder is /tmp/cf
8: put RUNONBOX //put executable on device NOTE: folder is /tmp/cf
9: export LD_LIBRARY_PATH=/tmp/cf/:$LD_LIBRARY_PATH
9: ./RUNONBOX
>> can't load library 'libMYLIB.so'

The questions that I have are
A: Why won't my library be loaded even though I've set the LD_LIBRARY_PATH
to look in the directory with libMYLIB.so?
B: How do I have 2 other libraries that are linked to this program that do
not show dependencies when I run 'ldd'?  NOTE: these libraries are on the
embedded device, but are in a folder where I can't place my links and
libMYLIB.so
C: Is there anything else I can try?:working:
-- 
View this message in context: http://old.nabble.com/Shared-Libary-Issue---cannot-find-library-tp33352272p33352272.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux