Why is the size of the executable in an MFC dialog built with VS 2012 almost 3 times the size of one built with VS 2005?

I did an experiment by building a default MFC dialog using VC ++ 6.0, VS 2005, VS 2008, VS 2010 and VS 2012.

Each of these was built using MFC in a static library because potential users usually don't have the privilege to set the required time intervals. Every multibyte char set used was built in release mode and had Winsock support. It was on a Windows 7 machine. All 32-bit applications.

The VS 2012 app had a switch set _AFX_NO_MFC_CONTROLS_IN_DIALOGS

to make it smaller, which did almost nothing. Here are the results:

VC++6.0    204 KB
VS 2005    304 KB
VS 2008   1690 KB
VS 2010   1724 KB
VS 2012   3888 KB

      


I was amazed to find that the application built using VS 2012 was 10 times the size built using 2005. Is this all related to improved security?

My company is dropping everything except VS 2010 and VS 2012 due to security vulnerabilities in older IDEs. I usually build and maintain large and complex MFC dialog based applications and many of them run concurrently, so I would like to minimize their overall memory footprint.

Apart from dumping MFC and moving to C # / WPF or QT, each with their own disadvantages;

  • Is there some magic compiler tweak I can use with VS 2012 to remove some of this bloat?
+3


source to share


1 answer


This is a known issue. Here are some links to view:



0


source







All Articles