www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/24/16:07:41

X-Lotus-FromDomain: LI-COR
From: "Pat Humphrey" <phumphrey AT licor DOT com>
To: djgpp AT delorie DOT com
Message-ID: <8625688F.0072245A.00@hooper2.licor.com>
Date: Thu, 24 Feb 2000 14:36:13 -0600
Subject: Hello World
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com



I'm hoping this is as easy one and would appreciate the help.

I've recently bought "Sams Teach Yourself C++", 2nd Edition by Jesse
Liberty.  I read through the first chapter and think the book is great.
I'm in the process of attempting to compile the "Hello World!" program
using the DJGPP version 2.02 compiler included on the CD provided with
the book.  I installed the compiler from the CD on my Windows 98
computer with no apparent problems.

The program listing is as follows:

#include <iostream.h>

int main()
{
   cout << "Hello World!\n";
   return 0;
}

From a DOS prompt I attempted to compile the program as follows:

gcc -c -Wall Hello.cpp

The resultant error message I received was:

In file include form Hello.cpp:1:
c:/djgpp/lang/cxx/iostream.h:31: streambuf.h: No such file or directory
(ENOENT)

I'm not sure what's going on.  The include file "streambuf.h" is located
in the same directory as "iostream.h".  I checked the autoexec.bat file
and it has been updated per the required settings:

set PATH=C:\DJGPP\BIN;%PATH%
set DJGPP=C:\DJGPP\DJGPP.ENV

I'm not sure how the compiler was able to find "iostream.h" and not
"streambuf.h".  Does the config.sys file need something in it as well?
Presently it basically has nothing.  Your insights would be greatly
appreaciated!

Thanks in advance,
Pat


- Raw text -


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