c++ compile problem
John Oxley
oxo at rucus.ru.ac.za
Thu Jun 3 17:00:53 PDT 2004
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 at 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
More information about the freebsd-questions
mailing list