Date: Tue, 11 Jul 2000 15:56:53 -0400 From: Will Andrews <andrews@technologist.com> To: Matthew Hagerty <matthew@venux.net> Cc: Will Andrews <andrews@technologist.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: ld static search path? Message-ID: <20000711155653.D501@argon.gryphonsoft.com> In-Reply-To: <4.3.2.7.2.20000711153827.00bf79c0@127.0.0.1>; from matthew@venux.net on Tue, Jul 11, 2000 at 03:40:40PM -0400 References: <4.3.2.7.2.20000711145318.00c19c40@127.0.0.1> <4.3.2.7.2.20000711145318.00c19c40@127.0.0.1> <20000711151621.C501@argon.gryphonsoft.com> <4.3.2.7.2.20000711153827.00bf79c0@127.0.0.1>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <andrewsw@purdue.edu> <will@FreeBSD.org> 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000711155653.D501>