Tech Support > Microsoft Windows > Development Resources > Exe binary size, Dialog and Console app
Exe binary size, Dialog and Console app
Posted by TheOne on May 14th, 2008


I have an Mfc dialog-based app which simply gets arguments and
generating files.

Because it doesn't have to be an dialog-based, expecting a smaller
binary, I wrote an (mfc support) console app which does exactly the
same task. However, surprisingly, the console app is bigger than the
older one.

I'm using VC 6.0 and using the default compile settings, maximize
speed.

I look into the each Release folder:

DApp.exe 20KB 20480
DApp.obj 10KB 9929
DApp.res 3KB 2484
DAppDlg.obj 14KB 14051
StdAfx.obj 1KB 768

====
CApp.exe 24KB 24576
CApp.obj 6KB 5887
CApp.res 5KB 4584
StdAfx.obj 1KB 806

....
1. For D app, DApp.exe < DApp.obj + DAppDlg.obj , I don't understand
this. Shouldn't it at least be bigger than this?
2. Shouldn't a console app be slimmer than a Gui app?

TIA.

--
Daewon YOON

Posted by boris on May 15th, 2008



"TheOne" <daewon.yoon@gmail.com> wrote in message
news:0e2ed3e0-4491-457a-b937-c25af7be8900@p25g2000pri.googlegroups.com...

It depends on your compiler/linker options. For example:
http://msdn.microsoft.com/en-us/libr...43(VS.80).aspx

guess) than console app that's staticly linked with C-Runtime.

Boris



Similar Posts