www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/17/21:53:42

From: "Lucas Moten" <lucasmoten AT axiomstudios DOT com>
To: <djgpp AT delorie DOT com>
Subject: New User Using Windows 95, Can't get DJGPP to compile
Date: Wed, 17 Jun 1998 21:56:55 -0400
Message-ID: <000401bd9a5c$5ed30b80$0300a8c0@lucas>
MIME-Version: 1.0
Importance: Normal
Sensitivity: Personal

Im a new user to using C/C++ as well as DJGPP and the RHIDE tool.  To learn
I reference books and websites, all of which are leaning to starting out by
immediately making use of includes.

Heres my program listing - Simple Hello World.

/*------------------BEGIN CODE SNIPPET----------------*/
/*A small program */
#include <iostream.h>

void main(void)
{
cout << "Hello World\n";
}
/*-------------------END CODE SNIPPET-----------------*/

Pretty simple eh?
The first problem I ran into this was the include header, 'iostream.h'.
Nothing wrong with the file itself, except it references 'streambuf.h'.
This is a long filename.  Now for some reason, unzipping after modifying the
registry as stated in the docs on the djgpp website didnt give me a file of
'streambu.h', it still gave 'streambuf.h' or .. 'stream~1.h'.  No major
hassle here, I just renamed all of the long files (over a hundred of em i
believe, but its done).

The problem arises in the streambuf.h file itself.
On lines 35-37 of the streambuf.h file it reads...

extern "C" {
#include <libio.h>
}

I, as a new user, don't have a clue what 'extern' is, or what it does.  If I
was to guess it looks like its using yet another include 'libio.h' if its a
C program (Im probably not really straight on track, but this isnt the
issue - Im here to learn hehe).
There error I get for this is on line 37..

Error: parse error before `}'

I am getting other errors and warnings after this one, but what Im lookin
for is a reason why Im getting this first error.  The syntax to me looks
correct, on top of that, its the same header file everyone else out there is
using with 'no' problems (I guess).  Is this a problem attributed to my
filename dilema that received a force fix? - Or something entirely
different.

Can anyone help me with whats going wrong here and guide me through this?
I'd like to learn by using DJGPP, but thus far its been discouraging.

-Lucas Moten
lmoten AT moon DOT jic DOT com

- Raw text -


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