On Tue, Jul 11, 2000 at 03:40:40PM -0400, Matthew Hagerty wrote:
> Then how does ld find libraries in /usr/lib without me having to specify a:
> -L/usr/lib flag?  Seems that /usr/lib would have to be hard coded into ld 
> or something?

As far as I know, ld hardcodes /usr/lib (and other search paths) for the
system libs; they are hidden during compilation unless you use -v.  This
is why you have to specify the path to static libs such as
/usr/local/lib/libsomelib.a, even if you specify -L/usr/local/lib, and
ld has /usr/local/lib in its shared search paths.

There are ways to remove the static search paths hardcoded into ld..

Of course, I'm not 100% sure of everything I'm saying, but this has been
my experience with static libs.  I always just refer to them by their
full path when linking.

-- 
Will Andrews <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
GCS/E/S @d- s+:+>+:- a--->+++ C++ UB++++ P+ L- E--- W+++ !N !o ?K w---
?O M+ V-- PS+ PE++ Y+ PGP+>+++ t++ 5 X++ R+ tv+ b++>++++ DI+++ D+ 
G++>+++ e->++++ h! r-->+++ y?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to