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.

20th Apr 2021, 11:07 AM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
4 ответов
+ 1
What are the compiler flags ( especially optimisation options ) you are using when building your program with different compilers ?
20th Apr 2021, 2:51 PM
Arsenic
Arsenic - avatar
+ 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.
22nd Apr 2021, 10:28 AM
Arsenic
Arsenic - avatar
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
20th Apr 2021, 5:30 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
0
Arsenic Can you help me
21st Apr 2021, 8:11 AM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar