How do I link to a shared lib without having that lib's dependencies (the way MS link does)
Richard Henderson
rth@redhat.com
Tue Aug 12 18:11:00 GMT 2003
On Mon, Aug 11, 2003 at 07:28:57PM -0700, David Wuertele wrote:
> # Compile and link prog.c to libA.so
> gcc -o prog prog.c -L. -lA
> /usr/bin/ld: warning: libB.so, needed by ./libA.so, not found
> (try using -rpath or -rpath-link)
Did you even try the suggestion? Adding -rpath-link=. would
indeed have solved your problem.
r~
More information about the Binutils
mailing list