From owner-freebsd-questions@FreeBSD.ORG Thu Jun 3 17:00:53 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 B415116A4CE for ; Thu, 3 Jun 2004 17:00:53 -0700 (PDT) Received: from server.rucus.ru.ac.za (server.rucus.ru.ac.za [146.231.115.1]) by mx1.FreeBSD.org (Postfix) with SMTP id DB1A843D49 for ; Thu, 3 Jun 2004 17:00:51 -0700 (PDT) (envelope-from oxo@rucus.ru.ac.za) Received: (qmail 80800 invoked from network); 4 Jun 2004 00:00:45 -0000 Received: from shell-em0.rucus.ru.ac.za (oxo@10.0.0.1) by server-em0.rucus.ru.ac.za with QMQP; 4 Jun 2004 00:00:45 -0000 Date: Fri, 4 Jun 2004 02:00:45 +0200 From: John Oxley To: questions@freebsd.org Message-ID: <20040604000045.GA10876@rucus.ru.ac.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: c++ compile problem 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: Fri, 04 Jun 2004 00:00:53 -0000 I have written and incredibly complex cpp program #include using namespace std; int main(void) { cout << "Hello World!" << endl; return 0; } On a linux box, uname -a: Linux skeleton 2.4.22-gentoo-r7 #4 Mon Mar 29 22:21:06 SAST 2004 i686 AMD Athlon(tm) XP 2400+ AuthenticAMD GNU/Linux everything works perfectly, the program compiles. on a FreeBSD box however, uname -a: FreeBSD shell.rucus.ru.ac.za 5.1-RELEASE-p13 FreeBSD 5.1-RELEASE-p13 #3: Thu Feb 5 21:18:42 SAST 2004 drs@shell.rucus.ru.ac.za:/usr/obj/usr/src/sys/SHELL i386 the compiler throws many error messages $ g++ -ansi -pedantic -Wall -ggdb -o hello hello.cpp 2>&1 | wc -l 88 I have posted the messages at http://oxo.rucus.net/cpp-err.txt If I compile without -ansi and -pedantic, everything works fine. This is my first foray into cpp on FreeBSD, before I have coded only in C. Please could someone tell me what I am doing wrong. -Ox -- /~\ The ASCII ASCII stupid question, get a EBCDIC ANSI. \ / Ribbon Campaign John Oxley X Against HTML http://oxo.rucus.net/ / \ Email! oxo rucus.ru.ac.za "Personally, I'd rather pay for my freedom than live in a bitmapped, pop-up-happy dungeon like NT." -- Thomas Scoville