delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/02/19:33:18

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Iostream.h
Date: Mon, 02 Feb 1998 19:09:38 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 35
Message-ID: <34D66042.118E@cs.com>
References: <Pine DOT SOL DOT 3 DOT 96 DOT 980202092202 DOT 18308A-100000 AT uhura DOT cc DOT rochester DOT edu>
NNTP-Posting-Host: ppp229.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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