delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/31/20:16:13

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help : gpp doesnt find iostream
Date: Tue, 31 Mar 1998 19:08:46 -0500
Organization: Two pounds of chaos and a pinch of salt.
Lines: 37
Message-ID: <3521858E.44E@cs.com>
References: <35218B91 DOT 263D AT scri DOT sari DOT ac DOT uk>
NNTP-Posting-Host: ppp225.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Oliver Brendel wrote:
> 
> I have just installed DJGPP from scratch. then I tried to compile my
> standard "Hello World!" programm from within EMACS with ALT-x compile.
> The programm includes <iostream>.
> The result I get from EMACS is an error message that iostream cannot be
> found. If I compile from DOS with gpp -Wall -o hellow.exe hellow.cc it
> works fine and the .exe runs. if I compile from DOS with gpp -o
> hellow.exe hellow.cc it doesn't find the iostream again...

The use of <iostream> (name of header without '.h' extension) is a
relatively new C++ feature that is not supported by gcc 2.7.2.1, the
version you probably still have.  It's quite shiny-new, in fact, so many
compilers probably still don't support it.

Fortunately, the latest version of gcc, 2.8.0, has been recently ported
to DJGPP, and it contains far better C++ support than the previous
version (although exceptions are semi-broken).  If you decide to
download it, you should completely replace your old 2.7.2.1 files; i.e.,
delete them completely and then install 2.8.0 from scratch.  The files
are gcc280b.zip, gpp280b.zip, and lgpp280b.zip.  If you are running
under Windows 95, you will probably want to change the registry
according to FAQ chapter 8.2 to make it LFN/SFN-clean, and you'll need
to make a small fix to RHIDE.

If you'd rather stick with 2.7.2.1, change <iostream> to <iostream.h>,
the way God intended it to be.  :-)

-- 
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>  UIN# 7406319

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? C++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------

- Raw text -


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