From owner-freebsd-questions Tue May 12 08:58:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA25743 for freebsd-questions-outgoing; Tue, 12 May 1998 08:58:15 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hotpoint.dcs.qmw.ac.uk (hotpoint.dcs.qmw.ac.uk [138.37.88.162]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA25642 for ; Tue, 12 May 1998 08:58:04 -0700 (PDT) (envelope-from scott@dcs.qmw.ac.uk) Received: from brunos-sun.dcs.qmw.ac.uk [138.37.88.185]; by hotpoint.dcs.qmw.ac.uk (8.8.7/8.8.5/S-4.0) with SMTP; id QAA29028; Tue, 12 May 1998 16:57:48 +0100 (BST) Date: Tue, 12 May 1998 16:57:48 +0100 (BST) Message-Id: <199805121557.QAA29028@hotpoint.dcs.qmw.ac.uk> Received: locally by brunos-sun (SMI-8.6/QMW-client-3.2b); poster "scott"; id QAA01014; Tue, 12 May 1998 16:53:25 +0100 From: Scott Mitchell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Chris Martino CC: freebsd-questions@FreeBSD.ORG Subject: Re: Compiling In-Reply-To: <93470510@toto.iv> X-Mailer: VM 6.22 under 19.15 XEmacs Lucid Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chris Martino said: >Hi, >I'm trying to compile some simple c++ programs that I've written, and I >need to include some of the header files in /usr/include/g++/. I would I >go about adding that to my path so I don't have to put g++/whatever.h in >my .c file. > >Thanks! >Chris Your C++ source files should have a .C or .cc extension -- this is how gcc knows what to compile them as. If it thinks it's compiling C++, it will look in /usr/include/g++ by default. You'll probably find it useful to run 'g++' rather than plain old 'gcc' to compile C++ -- the former automatically links against libg++ whereas gcc doesn't. Scott. -- =========================================================================== Scott Mitchell | PGP Key ID |"If I can't have my coffee, I'm just | 0x54B171B9 | like a dried up piece of roast goat" QMW College, London, UK | 0xAA775B8B | -- J. S. Bach. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message