Mail Archives: djgpp/2003/07/20/03:05:57
/* c */
#include <stdio.h>
int main(void) {
puts("Hello World\n");
return 0;
}
- - - - - - - - - - - - - - - - - - - -
/* C++ */
#include <iostream>
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//
- Raw text -