From owner-freebsd-questions Fri Nov 10 17:24:49 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA22407 for questions-outgoing; Fri, 10 Nov 1995 17:24:49 -0800 Received: from bubba.tribe.com ([205.184.207.7]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA22393 for ; Fri, 10 Nov 1995 17:24:38 -0800 Received: (from archie@localhost) by bubba.tribe.com (8.6.12/8.6.12) id RAA03141; Fri, 10 Nov 1995 17:23:46 -0800 From: Archie Cobbs Message-Id: <199511110123.RAA03141@bubba.tribe.com> Subject: Re: ld default path To: nate@rocky.sri.MT.net (Nate Williams) Date: Fri, 10 Nov 1995 17:23:46 -0800 (PST) Cc: archie@tribe.com, freebsd-questions@freebsd.org In-Reply-To: <199511110007.RAA03383@rocky.sri.MT.net> from "Nate Williams" at Nov 10, 95 05:07:10 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1122 Sender: owner-questions@freebsd.org Precedence: bulk > > The default search path for "ld" in 2.1-951104-SNAP does not include > > /usr/local/lib... should this perhaps be added? > > Why, when you reboot any libraries there get added in /etc/rc? > > # Make shared lib searching a little faster. Leave /usr/lib first if you > # add your own entries or you may come to grief. > if [ -x /sbin/ldconfig ]; then > _LDC=/usr/lib > if [ -d /usr/X11R6/lib ]; then _LDC="${_LDC} /usr/X11R6/lib" ; fi > if [ -d /usr/X386/lib ]; then _LDC="${_LDC} /usr/X386/lib" ; fi > if [ -d /usr/local/lib ]; then _LDC="${_LDC} /usr/local/lib" ; fi > echo 'setting ldconfig path:' ${_LDC} > ldconfig ${_LDC} > > Notice that /usr/local/lib is added via ldconfig. Sorry, I should have been more specific... this applies only to static libraries... Suppose you have /usr/local/lib/libXXX.a and you complile a program with "cc -o program program.c -lXXX" then it won't be found. -Archie _______________________________________________________________________________ Archie L. Cobbs, archie@tribe.com * Tribe Computer Works http://www.tribe.com