www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/09/03/03:30:39.1

From: Manni Heumann <manni DOT heumann AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: iostream deprecated and file size
Date: 3 Sep 2002 07:20:23 GMT
Lines: 52
Message-ID: <al1nrm$1l188o$1@ID-54749.news.dfncis.de>
References: <20020903040546 DOT 17731 DOT qmail AT web14806 DOT mail DOT yahoo DOT com>
NNTP-Posting-Host: ppp164-88.uni-bielefeld.de (129.70.164.88)
Mime-Version: 1.0
X-Trace: fu-berlin.de 1031037623 55615768 129.70.164.88 (16 1428 [54749])
User-Agent: Xnews/5.04.25
X-Face: "c)Go+A65AgR*9'!B)BMLM$kYg6HDG!_g'DAsj*ALo%=kp{X&abs&t\G0F~*r?VRj#|4=6)M.RJPnD]Ql:B<-7A^EAYFpDpZRMoJy?80^3B3b AT DXb%MTyOD.*4wu&Xt6o*+6`r5E
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Vikrant Naik wrote:

> 
> help!
> 
> 
> (1):
> i downloaded & installed gpp 3.1 and all other associated zips
> recently.now when i compile with: gpp -o file.exe file.cpp
> 
>  it tells me:

[very helpful warning snipped]

> i use #include<iostream.h> which i think is the cause of this
> error. the prog however compiles and i do get the exe.
> i tried using #include<iostream> as suggested but it says:
> " `cout' undeclared (first use this function) ".......etc

Yes, <iostream.h> was the cause of this _warning_. <iostream> is the 
standard complying form of this file. The C++ standard also says that 
cout lives in namespace std::. So cout << "hello world" << endl; 
becomes std::cout << "hello world" << std::endl;
If this is too much to type for you, you can also place a using 
directive in your code: using namespace std;
 
> i copied the file "iostream.h" from
> C:\DJGPP\lang\cxx-v31\backward into C:\DJGPP\include and then
> compiled but again the 'deprecated header' error 

Before messing up your compiler, I suggest reading a book or other 
sort of reference first.
...

> (2):
> when  i compile and get the exe, the exe file size is an
> unbelievable 1.42MB!!! ive used: gpp -o file.exe -s file.cpp ,
> the -s switch, and the file size reduces to 255KB which again i
> think is really too much.when i used an earlier version of DJGPP
> i did not get such huge file sizes now every time i have to use
> UPX to reduce file size which again comes to around 90KB. can
> someone please tell me a way to reduce the initial file size.are
> there any more switches besides '-s' 

There is a section of the FAQ dedicated to this issue: 8.14

But if you end up with 90k, what's the problem?


Manni

PS: No need to post in HTML, we still know how to read plain text.

- Raw text -


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