GCC C++ “Hello World” program -> .exe is 500kb big when compiled on Windows. How can I reduce its size?

前端 未结 14 2357
遇见更好的自我
遇见更好的自我 2020-11-27 04:29

I just recently started learning C++ - I am using nuwen\'s version of MingW on Windows, using NetBeans as an IDE (I have also MSDN AA Version of MSVC 2008, though I don\'t u

14条回答
  •  遥遥无期
    2020-11-27 04:53

    If you need small executables, Tiny C will compile a 1536 bytes executable for a printf("Hello world!") TinyC is only C, not C++ and is known to compile faster and give slower executables than gcc.

    EDITED: I have just tried a cout<"Hello World!" in DevC++ (bundles Mingw 4.8 and an Ide) and i got a 4,5 MB executable!!

提交回复
热议问题