Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smaller apps

Status
Not open for further replies.

imagenetics

Programmer
Dec 8, 2003
66
PL
How come that I write a simple application which consists, for example, of one form with an edit box and a button, one icon in the resources... and compiled *.exe weights 300 kilobytes?
There are programs that take 100 kilobytes, or even 30. What should I do to make my small application small indeed?
 
Hi!

Using RAD tools like Builder/Delphi gonna costs some. If ya wanna build smaller apps, you should create pure Windows API application. Try console wizard...

unbornchikken
 
You can minimize the program size by changing program options. Make sure "Build with runtime packages" is turned on. Make sure you click on the "Release" button for debugger. Use Dynamic RTL. Don't create debug information. These will minimize the EXE file size, but then you are required to ship all of the dll's that your program will be using, which I guarentee will be greater than a meg in size.

Creating a window and registering it with all MFC functions, through the console wizard as Unbornchicken suggested, is the way to completely reduce the size but much harder than changing program options. If you don't have a good reason to limit the size, I wouldn't mess with things at all. :)

Chris
 
Can any body say code bloat 10 times real fast.


tomcruz.net
 
the program is getting bigger becouse the run time.
this will be the case if you build in msvc (and set options to relese...).

you can cut down size by writing with api function
or you can use UPX - exe file compression tool.
you can get it at :

have fun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top