Re: [Dev-C++] Executable size is huge
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: <or...@vp...> - 2003-12-29 13:27:16
|
Kevin Sopp wrote: > using a simple Hello World program and the appropriate compiler flags > (-O3) and without any debug info the executable is about 440KB in size. > The compiler doesn't seem to be doing any dead code removal. I remember > I had this problem a long time ago when I used cygwin but I don't > remember my solution. This is not a problem, and there is no real "solution" to it. One alternate "solution" might be to use simple C code for a Hello World program. That will get you a 20 KB exe :) However, if you wish to reduce the size of your exe, use UPX. http://upx.sf.net The size growth for C++ is because stdc++ is linked statically into the exe, however when using simple C code, the exe is linked dynamically to Windows DLLs (like msvcrt.dll, etc.) -- Greetings, Balázs |