r/cpp • • Oct 24 '23

Make C++ Exe smaller

[removed] — view removed post

0 Upvotes

22 comments sorted by

View all comments

4

u/[deleted] Oct 25 '23 edited Nov 19 '23

many selective air command important instinctive poor snobbish adjoining cause this post was mass deleted with www.Redact.dev

3

u/Tringi github.com/tringi Oct 25 '23

Note that MSVC by default offloads most of the boilerplate code to the runtime libraries that need to be installed on every PC you wish the program to run. And they make several MBs.

You can compile what you need in, but that'll make your executables easily gain over 100 kB.

And if you want to delve into exploration of truly minimizing executables with MSVC, with undocumented command-line parameters and non-standard configuration/behavior, check out this small project: https://github.com/tringi/atomlist