Date: Fri, 4 Jun 2004 02:00:45 +0200 From: John Oxley <oxo@rucus.ru.ac.za> To: questions@freebsd.org Subject: c++ compile problem Message-ID: <20040604000045.GA10876@rucus.ru.ac.za>
next in thread | raw e-mail | index | archive | help
I have written and incredibly complex cpp program #include <iostream> 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 <at> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040604000045.GA10876>