Mail Archives: djgpp/2000/10/20/12:00:12
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 -