Mail Archives: djgpp/1998/11/11/10:45:44
Are you sure you didn't call it whatever.c
^^^
It must be .cpp .cc or if in win95 you can call it .C.
Also use gxx for cpp programs.
Peter Allen
dr_drood AT SPAMTRAPgeocities DOT com wrote:
>
> Hi
>
> Total C++ newbie here. I just started studying C++ after getting bored
> with Visual Basic, but DJGPP is choking severely on the incredibly
> simple program below. The program itself is fine, but on compiling a
> BUCKET load of errors appear from iostream.h. In an attempt to fix it,
> I even reinstalled DJGPP all over again, and that just made even more
> errors. Included below is the brain damagingly easy program. (Standard
> "Hello World!" program) followed by the multitude of errors. Bearing
> in mind this is the first program in the book I have, this is making
> it pretty hard to learn C++. (If I had any hair left, I`d be pulling
> it out.) I've tested it on a Unix box using emacs and g++ and it works
> just fine, no errors on compiling.
>
> If you could email me (removing the obvious from the address) that`d
> be great, but as you're being courteous enough to help me, you don't
> have to. I'll just be glad of an answer in whatever form. I've finally
> motivated myself to get started on learning C++, and it chokes on the
> first thing I do.:(
>
> #include <iostream.h>
> int main()
> {
> cout << "Hello World!\n";
> return 0;
> }
>
> In file included from c:/djgpp/lang/cxx/iostream.h:31,
> from C:\\temp\\test.cc:1:
> c:/djgpp/lang/cxx/streambuf.h:393: `__null' was not declared in this
> scope
> c:/djgpp/lang/cxx/streambuf.h: In method `int
> streambuf::have_backup()':
> c:/djgpp/lang/cxx/streambuf.h:329: `__null' undeclared (first use this
> function)
>
> c:/djgpp/lang/cxx/streambuf.h:329: (Each undeclared identifier is
> reported only
> once
> c:/djgpp/lang/cxx/streambuf.h:329: for each function it appears in.)
> c:/djgpp/lang/cxx/streambuf.h: In method `int
> streambuf::have_markers()':
> c:/djgpp/lang/cxx/streambuf.h:330: `__null' undeclared (first use this
> function)
>
> c:/djgpp/lang/cxx/streambuf.h: In method `void streambuf::allocbuf()':
> c:/djgpp/lang/cxx/streambuf.h:374: `__null' undeclared (first use this
> function)
>
> c:/djgpp/lang/cxx/iostream.h: At top level:
> In file included from C:\\temp\\shite.cc:1:
> c:/djgpp/lang/cxx/iostream.h:50: `__null' was not declared in this
> scope
> c:/djgpp/lang/cxx/iostream.h:91: parse error before `__extension__'
> c:/djgpp/lang/cxx/iostream.h:123: `__null' was not declared in this
> scope
> c:/djgpp/lang/cxx/iostream.h:208: parse error before `__extension__'
> c:/djgpp/lang/cxx/iostream.h:230: `__null' was not declared in this
> scope
>
> --
> Something catchy should go here
- Raw text -