This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld - lQuerry about ibrary linking.
- From: Nick Clifton <nickc at redhat dot com>
- To: shrikar at poseidontech dot com
- Cc: binutils at sources dot redhat dot com
- Date: 28 Jan 2003 11:50:23 +0000
- Subject: Re: ld - lQuerry about ibrary linking.
- References: <004701c2c5fb$08c84140$1301a8c0@blr.vsnl.net.in>
Hi Shrikar,
> Means if ld finds the library in search path it will get it and link
> it. But even if it doesnt find the archive in that path, as long as
> all the symbols are resolved, it should *not* give an error as *"Can
> not find -l<archive>"*.
There is no way to do this using the linker. If you specify a library
name on the command line, and the library cannot be found, it is an
error and the linker will not produce an executable.
You will have to arrange not to pass the -l... option to the linker if
the library is not present.
Cheers
Nick