Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 1995 17:23:46 -0800 (PST)
From:      Archie Cobbs <archie@tribe.com>
To:        nate@rocky.sri.MT.net (Nate Williams)
Cc:        archie@tribe.com, freebsd-questions@freebsd.org
Subject:   Re: ld default path
Message-ID:  <199511110123.RAA03141@bubba.tribe.com>
In-Reply-To: <199511110007.RAA03383@rocky.sri.MT.net> from "Nate Williams" at Nov 10, 95 05:07:10 pm

next in thread | previous in thread | raw e-mail | index | archive | help

> > 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511110123.RAA03141>