shared library linking

Peter L. Peres plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sat Dec 20 20:33:26 UTC 2003


Back to linux:

I have a set of object files resulting from compiling a project and I want
to make them into a shared library. But I can't. It only works if I link
against ld-linux.so.1 which links to libc.so.5. It's as follows:

gcc -shared -o foo.so foo.o /lib/ld-linux.so.1: ok, also links to libc.so.5

gcc -shared -o foo.so foo.o /lib/ld-linux.so.2: ng, ldd complains

gcc -shared -o foo.so foo.o /lib/ld-linux.so.1 /lib/ld-linux.so.2:
	ok, ldd complains about possible conflict libc.so.5<->libc.so.6,
	linked against both libc.so.5 and libc.so.6 (which has precendence?)

All other current system libs (like libc etc) are linked against
ld-linux.so.2

What could cause this strangeness ? I suspect that my compiler setup is
somehow wrong. Any input would be much appreciated.

thanks,

Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list