why simple hello world binary is ~700KB

Gregor Richards Richards at codu.org
Thu Oct 4 15:17:22 PDT 2007


Bedros Hanounik wrote:
> why when I compile this program under gdc I get 697KB of binary and when I compile similar C code in gcc I get 6.5KB (both under Linux (GCC) 4.1.2 20070214 (  (gdc 0.24, using dmd 1.020))
> 
> 
> 
> import std.stdio;
> 
> int main ()
> {
> 	writefln("Hello World!");
> 	    return 0;
> }
> 
> how can I get small footprint binaries out of any D compiler? any difference between gdc and dmd?
> 
> 

As per usual, the person asking this has not stripped his binary. How do 
so many people continue to labor under the misconception that no extra 
info is added to the binary by default?

Strip your binaries.

  - Gregor Richards



More information about the Digitalmars-d mailing list