cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : Windows Programming : MinGW = Bloat!
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Articles
Lounge
Jobs

-

post  MinGW = Bloat!

g0dwyn (26)
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?
|
g0dwyn (26)
For what it's worth, I redirected my devC++ 4.9.9.2 to compile off of the latest MinGW.
|
Duoas (1378)
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.
|
Nate879 (22)
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
geektoo (4)
wrong place
| Last edited on
geektoo (4)
ok, but does your array are created in your function?
|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us