delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/20/12:00:12

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help!
Date: 20 Oct 2000 15:54:55 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 52
Message-ID: <8sppsf$fjh$1@nets3.rz.RWTH-Aachen.DE>
References: <001101c03a9a$49fa5110$600917ac AT ausnt010 DOT latticesemi DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 972057295 15985 137.226.32.75 (20 Oct 2000 15:54:55 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 20 Oct 2000 15:54:55 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Kevin O'Dwyer <kevin DOT odwyer AT latticesemi DOT com> wrote:
> I am doing some php3/MySQL stuff here.  php3 uses a lot of C language, so I
> figured just learn the whole C language.  Got the C++ book by Stephen Davis,
> and tried to install the GNU C++ for Windows/NT. (as if the dad of three
> pre-teens can crash-learn anything!)

You're confusing some things here, I think. Please note that C++ and C
are two separate languages. They are similar (one is derived of the
other, originally), but still different.

> As a function check, I tried to compile this simple code below, also taken
> from the CD ROM included with the book.  But it stumbles over the included
> file iostream.h.  The compiler finds errors in iostream.h.

That's a new kind of error, then. Your original message pointed into
another direction, because it contained no details at all.

> As I page through the delorie web site, it seems that lots of folks are
> having problems with this file.  

Yes, mostly beginners like you, using NT as their OS, and not
following the unpacking instructions closely enough. But from what you
write, that is not what went wrong for you, I think.

> "HELLO WORLD" EXAMPLE FILE:

[looks OK]

> FIRST FEW LINES OF iostream.h:
 
[looks reasonable]

> FIRST FEW LINES OF COMPILE ERRORS:
> ================================
> c:/djgpp/lang/cxx/iostream.h(35)Error: syntax error before `&'
> c:/djgpp/lang/cxx/iostream.h(46)Error: parse error before `{'
> c:/djgpp/lang/cxx/iostream.h(51)Error: parse error before `*'

You should have shown us lines 35, 46 and 51 of your iostream.h, then,
not just the first few ones. Also, the exact, full ouptut of gcc,
complete with the command you used to invoke it, would have been
interesting, not just the isolated error messages. Better still if you
could add the '-v' option to the command line.

Another possible reason would be a version mixup. I.e. if you have the
wrong combination of versions of gcc and the C++ libraries, things may
break in all sorts of funny ways. The use of #pragma interface in that
iostream.h you showed hints that it's a rather outdated version you're
using.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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