N
Nick Birnie
Hi,
I am developing a shared library and have a question about linking some
code with it.
Once I have a shared object compiled, with the .so still in the source
tree, I want to compile and link some tests with it, without first
installing the library.
If I compile the tests with the -L. and -lname switches, gcc produces
the object code, but the library is not found at run time.
Any idea what the problem could be?
Many thanks,
Nick
P.S.
This is the error:
../test: error while loading shared libraries: libnbthread.so: cannot
open shared object file: No such file or directory
Output of ldd:
linux-gate.so.1 => (0x00110000)
libnbthread.so => not found
libc.so.6 => /lib/libc.so.6 (0x006f4000)
/lib/ld-linux.so.2 (0x006cf000)
I am developing a shared library and have a question about linking some
code with it.
Once I have a shared object compiled, with the .so still in the source
tree, I want to compile and link some tests with it, without first
installing the library.
If I compile the tests with the -L. and -lname switches, gcc produces
the object code, but the library is not found at run time.
Any idea what the problem could be?
Many thanks,
Nick
P.S.
This is the error:
../test: error while loading shared libraries: libnbthread.so: cannot
open shared object file: No such file or directory
Output of ldd:
linux-gate.so.1 => (0x00110000)
libnbthread.so => not found
libc.so.6 => /lib/libc.so.6 (0x006f4000)
/lib/ld-linux.so.2 (0x006cf000)