Query regarding resolving inter-library dependencies

Kartik CDS kartik.cds at gmail.com
Thu Nov 13 04:29:03 UTC 2008


I have a executible. myexec.exe

I am writing a library mylib.so which depends on libperl.so. [libperl.so
inturn depends on several libraries IO.so, Fcntl.so, Socket.so etc etc]

myexec.exe will dynamically load the mylib.so.
But when running it fails asking for the libraries on which libperl.so was
dependent.

If i include the libperl.so in the link path of myexec.exe things go fine.
But i dont want to alter the link path.

I tried compiling mylib.so using :
libtool --mode=link --tag=CC g++-3.4 -rdynamic -shared -o mylib.so
PageValidator.o -L/lib -lperl

if i go on adding the dependent libraries to the libtool command then the
executable runs successfully.

Am i missing any options to recursively search and load the interdependent
libraries ?
Please clarify.



More information about the redhat-list mailing list