MinGW = Bloat!

Man, I just put in the latest version of MinGW (5.1.3). Result? 900kb+ for a "Hello World" exe. I compiled the exact same code on a Linux box with GCC; the result was 6.5kb. Is there anything I can do to trim the fat?
For what it's worth, I redirected my devC++ 4.9.9.2 to compile off of the latest MinGW.
It's not bloat. On your linux box, your "Hello World" ELF is dynamically linked to C++ libraries known to be on your system.

You can't generally make the same assumption on Windows, so GCC statically links _everything_ into your EXE. If you want a smaller EXE, use dynamic linking.
You're probably using iostream. Using stdio.h and/or conio.h will make the application smaller. To make it even smaller, run "strip <YOUR EXE>".
Last edited on
wrong place
Last edited on
ok, but does your array are created in your function?
Topic archived. No new replies allowed.