Reduce C++ output executable
arthurits opened this issue · comments
arthurits commented
Problem:
The release output executable from the C++ project is around 225 KB!
Tasks:
Tweak the compiler and linker arguments in order to reduce the file size.
arthurits commented
This was solved in commit 6a9e9ea.
The reason being the linking of the C run-time library in Configuration Properties → C/C++ → Code Generation → Runtime Library. When the flag /MT is set, the output executable includes the run-time, whereas the flag /MD does not include the run-time in the executable, but relies on the user having installed the MSVCRversionnumber.dll.
More detailed information can be found in Microsoft's documentation.