Static libraries Vs Executable`s size

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
rodrigorpb
Earned a small fee
Earned a small fee
Posts: 11
Joined: Thu Apr 17, 2008 7:49 pm

Static libraries Vs Executable`s size

Post by rodrigorpb »

I picked up a "Hello World" example, and noticed that its executable had 700Kb. Found this here: http://www.codeproject.com/KB/library/wxwidgets.aspx
But I tried to compile this same code, and obtained a 2.2mb executable.

Either were compiled with static libraries.

I use:
- MinGW
- wxWidgets 2.8.9
- CodeBlocks

and build wxWidgets this way
"mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=0 BUILD=release"

I`d like to know how if there is a way of obtaining an executable with this small size, compiling with static libraries.
vdell
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 536
Joined: Fri Jan 07, 2005 3:44 pm
Location: Finland
Contact:

Post by vdell »

This has been discussed many times in the forum. Do a search for "executable size" or "file size". There's also a wikipage about the subject.

HTH
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere
Post Reply