Date: Tue, 12 May 1998 16:57:48 +0100 (BST) From: Scott Mitchell <scott@dcs.qmw.ac.uk> To: Chris Martino <chrismar@peanut.readington.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Compiling Message-ID: <199805121557.QAA29028@hotpoint.dcs.qmw.ac.uk> In-Reply-To: <93470510@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <scott@dcs.qmw.ac.uk> | 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805121557.QAA29028>