From: RadSurfer Newsgroups: comp.os.msdos.djgpp Subject: (3) HELP Please with C++ Date: Sun, 20 Jul 2003 02:29:54 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse AT supernews DOT com Lines: 54 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com /* c */ #include int main(void) { puts("Hello World\n"); return 0; } - - - - - - - - - - - - - - - - - - - - /* C++ */ #include int main(void) { std::cout << "Hello World!" << std::endl; } - - - - - - - - - - - - - - - - - - - - gcc hw.c -o hw1.exe gxx hw.cpp -o hw2.exe .....A 07-19-2003 21:23:18 86 21F13B1D HW.C .....A 07-20-2003 02:07:50 43520 DD676BF1 hw1.exe .....A 07-20-2003 01:25:34 106 C353C5DD HW.CPP .....A 07-20-2003 02:20:50 507145 A5CA7587 hw2.exe [hex column is CRC32] OK! 2.953 creates a file roughly 520 bytes smaller for 'C' Why is the C++ executable 507,145 bytes??? yikes! More discussion please.... How does one get the EXE size down to something practical? BTW: A nearly similar Borland BCC32 compile of HW.CPP results in .....A 07-20-2003 01:42 100 5357307D HW.CPP .....A 07-20-2003 01:42 4958 95E194DE HW.obj .....A 07-20-2003 01:42 143360 53C13363 HW.exe 1/5th the EXE size of the DJGPP !! and only a 4953 object file....sheesh! ----------------------- I am lost as to why STD:: is required under DJGPP, and not under other compilers I have. It would be nice to understand the reasoning here.... THANKS! //RadSurfer//