0
TDM GCC vs MingW vs Visual Studio
Yo! I have used 4 compilers (x64) to compile same program in WINDOWS. But problem is that their is huge difference between compiled files size. I wanna know why their is that much difference and which one I should choose. TDM GCC 4.9.2 >> 127 KB TDM GCC 9.2.0 >> 322 KB Mingw-w64 >> 286 KB Visual Studio 2019 >> 11.5 KB I know that their can be difference between way of writing of compiler. And linking of programs but Visual Studio is showing huge difference.
4 Answers
+ 1
What are the compiler flags ( especially optimisation options ) you are using when building your program with different compilers ?
+ 1
Looks like your MSVC is building the application in release mode, meaning, it is doing all the code optimisation on the code it can, to achive maximum efficiency from it.
While on gcc, you are compiling with zero level optimisations activated.
0
Arsenic
I'm not using any flag.
Just
gcc test.c -o test
And for visual studio I don't know because I just click on button of run. I don't know if visual studio is using any flag
0
Arsenic
Can you help me