MinGW GCC - One 32-bit and 64-bit cross-compiler?

I downloaded MinGW with mingw-get-inst , and now I noticed that it cannot compile for x64.

So, is there a 32-bit binary version of the MinGW compiler that can compile for 32-bit Windows as well as 64-bit Windows?

I don’t want the 64-bit version to be able to generate 32-bit code, since I want the compiler to work on 32-bit Windows as well, and I am only looking for precompiled binaries here, not the source files, since I spent countless hours on the GCC build and failed, and for a while I refused :(

+6
gcc 32bit-64bit mingw
source share
2 answers

AFAIK mingw targets either 32-bit windows or 64-bit windows, but not both, so you will need two installations. And the latter is still considered beta.

For you, what you want is mingw-w64-bin_i686-mingw or mingw-w64-bin_i686-cygwin if you want to compile for Windows 64. For win32, just use what you get with mingw-get-inst.

See http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure for an explanation of file names.

+5
source share

I understand that this is an old question. However, this is due to the fact that the question was repeatedly repeated.

I found after many studies, which, by that time, years later, both compilers are usually installed by default when installing mingw from your repository (i.e. synaptic).

You can verify and verify by running the Linux locate command:

$ locate -r "mingw32.*[cg]++$" 

In my default Ubuntu installation (13.10), I have the following compilers that you select from ... found by issuing the locate command.

 /usr/bin/amd64-mingw32msvc-c++ /usr/bin/amd64-mingw32msvc-g++ /usr/bin/i586-mingw32msvc-c++ /usr/bin/i586-mingw32msvc-g++ /usr/bin/i686-w64-mingw32-c++ /usr/bin/i686-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-c++ /usr/bin/x86_64-w64-mingw32-g++ 

Finally, the minimum that you need to do on many systems will be executed:

 $ sudo apt-get install gcc-mingw32 

I hope that many links to this page can save many programmers from searching time.

+3
source share

All Articles