This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How do I link to a shared lib without having that lib's dependencies (the way MS link does)
- From: Richard Henderson <rth at redhat dot com>
- To: David Wuertele <dave-gnus at bfnet dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 12 Aug 2003 11:11:23 -0700
- Subject: Re: How do I link to a shared lib without having that lib's dependencies (the way MS link does)
- References: <m38ypz1udy.fsf@bfnet.com>
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~