Skip to main content

Posts

Showing posts from August, 2019

How to create a small Visual Studio 2017 Native C++/MFC Application

Sometimes it is useful to create a native Windows application that has no DLL dependencies. An example would be creating a simple tool application that you wish to share with others. If you need to ensure that end users have a large DLL installed to support the run time environment, this is can be counterproductive to making it easy. The solution is to use a native Windows application and statically link all required libraries into the single executable file. The user can run the application without installing anything, just by having the single executable. Back in the days of Microsoft Visual Studio 6, you could by default make small Dialog-based executables that would compile into an EXE of only a few hundred kB in size. Somewhere along the road from 1998 to Microsoft's 2017 version of Visual Studio, the default size got a lot larger.  Today, if you accept all default options, your Dialog-based GUI application will begin weighing in at a hefty 3.3MB. Can't we do better t...