Mail Archives: djgpp/2002/09/03/03:30:39.1
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 -