From owner-freebsd-hackers Tue Jul 11 12:59:37 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from galileo.physics.purdue.edu (galileo.physics.purdue.edu [128.210.67.225]) by hub.freebsd.org (Postfix) with ESMTP id A199A37B753 for ; Tue, 11 Jul 2000 12:59:34 -0700 (PDT) (envelope-from will@almanac.yi.org) Received: from argon.gryphonsoft.com (mobile-4-146.physics.purdue.edu [128.210.146.108]) by galileo.physics.purdue.edu (8.9.2/8.9.2) with ESMTP id OAA78725; Tue, 11 Jul 2000 14:59:33 -0500 (EST) (envelope-from will@almanac.yi.org) Received: by argon.gryphonsoft.com (Postfix, from userid 1000) id 1CA9A190E; Tue, 11 Jul 2000 15:56:53 -0400 (EDT) Date: Tue, 11 Jul 2000 15:56:53 -0400 From: Will Andrews To: Matthew Hagerty Cc: Will Andrews , freebsd-hackers@FreeBSD.ORG Subject: Re: ld static search path? Message-ID: <20000711155653.D501@argon.gryphonsoft.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i 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 X-Operating-System: FreeBSD 5.0-CURRENT i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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