www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/08/23:03:05

Sender: nate AT cartsys DOT com
Message-ID: <364668A3.862ADC2C@cartsys.com>
Date: Sun, 08 Nov 1998 19:59:31 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: What`s wrong with this program? PLEASE HELP!
References: <364687f9 DOT 37182612 AT news DOT 3web DOT net>
Reply-To: djgpp AT delorie DOT com

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.

At a first guess, it looks as if you're mixing versions of GCC and
libstdc++.  Please post the following:

* List of packages you downloaded and installed
* Output of a compile, using the `-v' option
* Contents of your environment (output of SET)
* Any deviations you've made from the installation directions in
README.1ST
* Anything else you think relevant

> #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

-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019