Mail Archives: djgpp/1996/01/29/04:02:56
> Peter Cooper wrote:
>
> > I downloaded all the stuff for DJGPP and unzipped them and they created
> > their own directories like /BIN /LANG etc.. so I decided to write a program.
> > so...
> >
> > #include "iostream.h"
> > void main(void) {
> > cout << "hi!\n";
> > }
> >
> > and went gcc file.cc
> > The error came back: IOSTREAM.H Cannot find filename or directory
>
> This is because iostream.h is not in the current directories. iostream.h is a
> standard header, and so should be included as
>
> #include <iostream.h>
This will not solve the problem unless the env var DJGPP does not point to
djgpp.env. Use set DJGPP=c:\djgpp\djgpp.env
>
> > so the program changed to:
> >
> > #include "c:\djgpp\lang\cxx\iostream.h"
> > void main(void) {
> > cout << "hi!\n";
> > }
> >
> > and then after that this error came up..
> > SOMETHINGELSE.H Cannont find filename or \
> > directory
>
> This is because the backslash means special things in a C string. You need to
> escape the strings, as in:
>
> #include "c:\\djgpp\\lang\\cxx\iostream.h"
Or even better #include "c:/djgpp/lang/cxx/iostream.h"
But the first case should work if you set DJGPP.
And read the FAQ. It is available from the same place you
get djgpp.
- Raw text -