So, recently, I've been trying to install the new gcc on windows. I had MinGW installed on my machine, however it wasn't the most recent version and it was only for 32 bits.
I was able to found the binaries for gcc 6.2 on the internet, but then, something weird happened, a simple Hello, world!
program was like 10 mb of space. Before the new version, a program with 13 different includes was only 203 kb on my machine.
I then noticed that I was using the MinGW that came with Haskell - the one that somehow is able to produce some really small files, and not the one I had in C - that one was the one who got updated, the one who started to gave me 10 mb binaries.
Using this code:
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}
With the following compiler options:
g++ -std=c++14 -Wall -Wextra -O3
With the updated version from this website: http://www.equation.com/servlet/equation.cmd?fa=fortran
, a simple Hello, world!
ends up with 10740kb!
With Haskell's version of MingGW g++ 5.2.0, the binary ends up with just 127kb.
I would like to know why this happened, and if possible I would also like to know how to install or where to download gcc 6.2 for windows, for both 32 and 64-bits machines.
Also, how does Haskell gcc is able to produce such small files? I mean, I'm happy with it - I just wish I could updated it!