Mail Archives: djgpp/1998/02/02/19:33:18
Dave Lahr wrote:
>
> Hello,
>
> I have recently downloaded and installed DJGPP. I have compiled a simple
> program in c++ that runs succesfully. However, I do not have the
> iostream.h file, because when I tried to use it, and cout and cin, it
> didn't work. I checked the include directory, and it wasn't there. Where
> do I get it?
If you read the DJGPP readme file (v2/readme.1st), you'll see the names
of the files you must download to get C++ functionality. They are
v2gnu/gpp2721b.zip, and v2gnu/lgp271b.zip. Both of these must be
installed to compile C++. The C++ headers go in the lang/cxx directory,
not the include directory.
If you've done that, then make sure:
- You are naming your files properly. gcc only recognizes .C (upper
case), .cc, .cpp, and .cxx as valid C++ extensions.
- Your DJGPP environment is set up correctly (i.e., you can compile C
programs with standard headers).
- If the problem is that your programs compile, but won't link, then
you must remember to add the C++ libraries to the command line. Use
'gxx' instead of 'gcc' to have the compiler do this for you.
Hope this helps.
--
---------------------------------------------------------------------
| John M. Aldrich | "Animals can be driven crazy by pla- |
| aka Fighteer I | cing too many in too small a pen. |
| mailto:fighteer AT cs DOT com | Homo sapiens is the only animal that |
| http://www.cs.com/fighteer | voluntarily does this to himself." |
---------------------------------------------------------------------
- Raw text -