Date: Mon, 10 Apr 2000 23:28:34 -0500 (CDT) From: Conrad Sabatier <conrads@home.com> To: David Johnson <djohnson@acuson.com> Cc: freebsd-newbies@FreeBSD.ORG Subject: RE: local libraries and includes Message-ID: <XFMail.000410232834.conrads@home.com> In-Reply-To: <38F2098A.FD407AFA@acuson.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000410232834.conrads>