1

Q: The executable for a "Hello World!" program built using MinGW-w64 (GCC C++) on Win 10 turns out to be 181 KB. It seems that 181 KB, for such simple code, is a bit too much — especially considering how tiny things like DOS are.

(Following the steps and code mentioned here: https://code.visualstudio.com/docs/cpp/config-mingw).
I was under the impression that a .exe file should have instructions in the form of machine code — smaller in size than the source C++ code. I then realized that the executable might also contain functions from the included libraries on which the source code depends. Still, 181 KB seems ill-optimized.

Am I misunderstanding somehting?

0 Answers0