From owner-freebsd-questions@FreeBSD.ORG Fri Mar 21 18:48:28 2008 Return-Path: Delivered-To: FreeBSD-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 505081065685 for ; Fri, 21 Mar 2008 18:48:28 +0000 (UTC) (envelope-from mdh_lists@yahoo.com) Received: from web56809.mail.re3.yahoo.com (web56809.mail.re3.yahoo.com [66.196.97.83]) by mx1.freebsd.org (Postfix) with SMTP id EE5E28FC41 for ; Fri, 21 Mar 2008 18:48:27 +0000 (UTC) (envelope-from mdh_lists@yahoo.com) Received: (qmail 93322 invoked by uid 60001); 21 Mar 2008 18:48:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=orWy0JgdWE8B//ldxXYB7ZAMffCQ9JB3MpwctutFjTRK2l1Vjd6Zi0fxSF/7xaodJOSW6AFX165uaZmnl/NIPRXajZLZaHft8mR9IzHViAMcbuAURoPZr9tPh7ldg3oXoExm/PBBmOP9ZXKY5uRwR4Zmjl+RmHvjzypdRNaFCEs=; X-YMail-OSG: cG0AZQMVM1kvCmf6O3QmOvowgEKLrWt5ybcPTiUIUENWLZCyvaKwC2HEz9Rshq6XOlar4APnJL2BZ6I9KB5fmW3sASbwa6Oy.K7SjsfOBsmjaAVK.S8- Received: from [71.61.66.195] by web56809.mail.re3.yahoo.com via HTTP; Fri, 21 Mar 2008 11:48:26 PDT Date: Fri, 21 Mar 2008 11:48:26 -0700 (PDT) From: mdh To: Eduardo Cerejo , FreeBSD-questions@FreeBSD.org In-Reply-To: <20080321144325.b13e5236.ejcerejo@optonline.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <12987.84776.qm@web56809.mail.re3.yahoo.com> Cc: Subject: Re: How do I add search paths to gcc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 18:48:28 -0000 --- Eduardo Cerejo wrote: > My gcc is only looking in /usr/lib and /usr/include > for libraries and hearders and I added the paths > /usr/local/lib/ and /usr/local/include to my .cshrc > file: > > set path = (/sbin /bin /usr/sbin /usr/bin /usr/games > /usr/local/sbin /usr/local/bin /usr/local/lib > /usr/local/include $HOME/bin) PATH in the environment is where your shell searches for programs to run from the command line, system(), etc. This allows you to type, say, `sh` instead of having to type out `/bin/sh` or risking having `/home/somekiddie/sh` run instead when you type it. > > but I still have to use gcc with -I and -L switch > for a program to compile or else it will fail. > > I'm using tcsh. There are two ways to set up alternate places to find libraries. The first is ldconfig, and you can see ports run this when you install a port containing shared libraries for example. The other is to use the LD_LIBRARY_PATH environment variable to set alternate paths at run-time. The 'ldconfig(1)' man page has more info for you. Take care, mdh ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping