From owner-freebsd-newbies Mon Apr 10 21:28:43 2000 Delivered-To: freebsd-newbies@freebsd.org Received: from cx344940-a.meta1.la.home.com (cx344940-a.meta1.la.home.com [24.6.21.74]) by hub.freebsd.org (Postfix) with ESMTP id D6AD237B57E for ; Mon, 10 Apr 2000 21:28:37 -0700 (PDT) (envelope-from conrads@cx344940-a.meta1.la.home.com) Received: (from conrads@localhost) by cx344940-a.meta1.la.home.com (8.9.3/8.9.3) id XAA94973; Mon, 10 Apr 2000 23:28:35 -0500 (CDT) (envelope-from conrads) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <38F2098A.FD407AFA@acuson.com> Date: Mon, 10 Apr 2000 23:28:34 -0500 (CDT) Organization: @Home Network From: Conrad Sabatier To: David Johnson Subject: RE: local libraries and includes Cc: freebsd-newbies@FreeBSD.ORG Sender: owner-freebsd-newbies@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 10-Apr-00 David Johnson wrote: > After having a bit of problems yesterday compiling some stuff, I came up > with a general question. What is the best way to have the build tools > look at /usr/local/lib and /usr/local/include? I put some stuff in my > .login, but there should be a better way. Is there a global file > somewhere I'm overlooking? What's the Standard Operating Procedure? To tell the compiler to search for includes in /usr/local/include (besides the standard /usr/include), use the following in your compile command: -I/usr/local/include To tell the linker to search for libraries in /usr/local/lib (besides the standard /usr/lib): -L/usr/local/lib You can add these to the CFLAGS variable in /etc/make.conf to have them used automatically in a Makefile. Just remember, you'll also need to specify any local libraries to link against, using the -l switch. For example, to tell the linker to use libfoo.a in /usr/local/lib: -L/usr/local/lib -lfoo (notice that both the leading "lib" and any extensions are not used) Hope this helps. -- Conrad Sabatier http://members.home.net/conrads/ ICQ# 1147270 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message