Mail Archives: djgpp/2000/12/10/05:06:45
Shea F. Kenny wrote:
> >Try the following program. If this doesn't compile, then something's
> >wrong with your set-up.
> >
> >// Hello World for C++
> >#include <iostream>
> >int main()
> >{
> > std::cout << "Hello, world!\n";
> >}
>
> Compiler says there's no iostream file.
I can think of three possible reasons for this:
(1) You gave the file a name ending in .c (instead of .cpp or .cc)
and you compiled with gcc (instead of gpp). This would cause
the compiler to think it was a C program, and not look in the
C++ include directory.
(2) You haven't installed the C++ parts of DJGPP. You should have
a lang\cxx directory (which contains the iostream file, among
other things).
(3) You have a very old version of DJGPP. (For C++ you really need
the latest version of the GNU compiler.)
If you can't get it working, you may be better off removing everything
and downloading the latest stuff from http://www.delorie.com/djgpp/
- use the zip-picker to help you decide which files you need and
remember to select C++. The versions of DJGPP supplied with books
often seem to cause problems.
- Raw text -