X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Hello, World! == 753 KB Date: 21 Feb 2002 13:20:49 GMT Organization: Cornell University Lines: 43 Sender: asu1 AT cornell DOT invalid (on pool-141-149-208-71.syr.east.verizon.net) Message-ID: References: NNTP-Posting-Host: pool-141-149-208-71.syr.east.verizon.net X-Trace: news01.cit.cornell.edu 1014297649 19637 141.149.208.71 (21 Feb 2002 13:20:49 GMT) X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu NNTP-Posting-Date: 21 Feb 2002 13:20:49 GMT User-Agent: Xnews/L5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Fausto Arinos de A. Barbuto" wrote in news:a521gd $42nsi$1 AT ID-76871 DOT news DOT dfncis DOT de: > > Or 752,983 bytes, to be the most accurate. and that makes 735Kb. > That's what I get when I compile the code below with > "gpp -o hello.exe hello.cpp" (gcc version 3.0.3). this is a faq so i suggest you check it. the main point is that this is a fixed overhead: the size of the executable does not double if you add another cout << "Hello World\n"; > Isn't that amazing? So tiny a code, so large an > executable! Is there a _good_ reason for that?... if there is a _good_ reason you worry about executable sizes (like trying to fit something on a floppy), you can always use upx (http://upx.sourceforge.net/). on my system, it reduces the executable size to 83Kb from 725Kb. > //---------CUT HERE--------- > #include ^^^ You should use the new style headers so that the compiler catch your errors: C:\DOCUME~1\asu1\LOCALS~1\Temp>gpp t.cc -o t.exe -Wall -O2 t.cc: In function `int main()': t.cc:6: `cout' undeclared (first use this function) t.cc:6: (Each undeclared identifier is reported only once for each function it appears in.) you will need a using std::cout; to make your code work. > #include similarly, use . Sinan.