From owner-freebsd-questions Mon Feb 10 23:04:50 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA04216 for questions-outgoing; Mon, 10 Feb 1997 23:04:50 -0800 (PST) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA04208 for ; Mon, 10 Feb 1997 23:04:44 -0800 (PST) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.5/8.6.12) with SMTP id XAA00989; Mon, 10 Feb 1997 23:04:40 -0800 (PST) Date: Mon, 10 Feb 1997 23:04:39 -0800 (PST) From: Doug White X-Sender: dwhite@localhost Reply-To: Doug White To: Randy DuCharme cc: questions@freebsd.org Subject: Re: How do I set include paths? In-Reply-To: <32FFF91A.41C67EA6@nconnect.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 10 Feb 1997, Randy DuCharme wrote: > I'm trying to build a few simple X programs but seem to have a bit of > difficulty with my include paths. I can't figure out how to set it > correctly. For example... > > // -- foo.c ** Sample source file > > #include > #include > > foo.c:12: X11/Xos.h: No such file or directory > foo.c:13: x11/Xlib.h: No such file or directory > Now if I do a... > > % gcc -g -I/usr/X11R6/include -c foo.c > > it works. This is the proper way to do it. The default is pretty conservative (I think only /usr/include and perhaps some others). It's not a bad idea to throw it on anyway just in case you carry your makefile somewhere else. > Is there an environment variable I can set to change this?... I feel > really stupid asking this, but it's driving me buggy. Regrettably, I'm > used to VC++, and Borland's products for DOS / Windows. They did all of > this stuff for me. The GCC manual (under info) would have details, but I don't recall it having such an option (probably for your own safety). Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major