From owner-freebsd-questions@FreeBSD.ORG Thu Aug 26 02:51:24 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCCCF16A4CF for ; Thu, 26 Aug 2004 02:51:24 +0000 (GMT) Received: from mxout6.cac.washington.edu (mxout6.cac.washington.edu [140.142.33.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8605E43D53 for ; Thu, 26 Aug 2004 02:51:24 +0000 (GMT) (envelope-from dsyphers@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) ESMTP id i7Q2pNUW005231; Wed, 25 Aug 2004 19:51:24 -0700 Received: from [192.168.1.100] (c-24-18-235-11.client.comcast.net [24.18.235.11]) (authenticated bits=0)i7Q2pN7v031614 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Wed, 25 Aug 2004 19:51:23 -0700 From: David Syphers To: Kris Kennaway Date: Wed, 25 Aug 2004 19:51:41 -0700 User-Agent: KMail/1.6.2 References: <200408251940.07032.dsyphers@u.washington.edu> <20040826024626.GA25115@xor.obsecurity.org> In-Reply-To: <20040826024626.GA25115@xor.obsecurity.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408251951.41684.dsyphers@u.washington.edu> cc: freebsd-questions@freebsd.org Subject: Re: help with 'hello world' X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2004 02:51:24 -0000 On Wednesday 25 August 2004 07:46 pm, Kris Kennaway wrote: > On Wed, Aug 25, 2004 at 07:40:07PM -0700, David Syphers wrote: > > This compiles fine on SunOS using egcs-2.91.66. However, it fails on > > FreeBSD (gcc 3.4.2) and RedHat (gcc 3.2.3) with the bizarre error "`cout' > > undeclared". > > How are you compiling it? At a guess, it sounds like you're using the > C compiler (gcc) not the C++ compiler (g++). No, I'm using g++: yggdrasil> cat test.cpp #include int main() { cout << "Hello World"; return 0; } yggdrasil> g++ test.cpp test.cpp: In function `int main()': test.cpp:4: error: `cout' undeclared (first use this function) test.cpp:4: error: (Each undeclared identifier is reported only once for each function it appears in.) -David -- +++ Divide By Cucumber Error. Please Reinstall Universe And Reboot. +++