I am programming in c++. I have installed mingw. I installed it from the standard installer from mingw website. I am confused between mingw32, mingw, mingw64. What are the differences and how can I check my version. Also when my programs are build, how would I know whether the executables created are 32 bit or 64 bit?
mingw and mingw32 are for creating executables for 32-bit windows systems. mingw64 is for creating 64-bit executables. Note: this doesn't have to do with what version you are running when you do the build, but what the target system is for the executable you are creating (the system on which you will be running the newly created executable).
Regarding MinGW and MinGW32, here's a snippet from
The MinGW Wiki
"The project's name changed from mingw32 to MinGW is to prevent the implication that MinGW will only works on 32 bit systems (as 64 and higher bit machines become more common, MinGW will evolve to work with them)."
To find out what version you have, go the the associated bin directory and do:
gcc --version
I'd recommend checking out minGW-w64, from here: http://mingw-w64.sourceforge.net/
That projects goal is to "deliver runtime, headers, and libs for developing 64 bit (x64), as well as 32 bit (x86), windows applications using gcc-4.6 or newer versions."
As indicated in the comments to the currently accepted answer gcc --version
will not give the target information but rather the version of gcc
itself.
Instead gcc -v
will print verbose information about the environment of the compiler. Among it you will find either the 64 bit (as shown by "x86_64")
Target: x86_64-w64-mingw32
or the 32 bit (as shown by "i686")
Target: i686-w64-mingw32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With