30

What's the difference between the MinGW project and the 32-bit portion of the MinGW-w64 project? Does the 32-bit portion of MinGW-w64 have any relation to x64 at all?

It seems like their compilers do the exact same things...

user541686
  • 205,094
  • 128
  • 528
  • 886

4 Answers4

20

The MinGW from http://www.mingw.org/ does only support gcc 32 bit (host and target). The independent minGW-w64 project provides support for 64 bit, and also supports a much larger part of the Windows API. The MinGW-w64 project however does not provide official binary builds: These can be grabbed either from the personal build directories of the developers (the most popular being rubenvb), or from associated but independent projects like tdm-gcc or mingw-builds or msys2.

Source: http://wiki.qt.io/MinGW-64-bit

KindDragon
  • 6,558
  • 4
  • 47
  • 75
13

As said by others MinGW-w64 is a fork of the original MinGW which supports both 32 and 64bit x86 processors. You can find the original motivation for the fork here:

https://sourceforge.net/p/mingw-w64/wiki2/History/

Regarding the differences you can find a list here:

https://sourceforge.net/p/mingw-w64/wiki2/Feature%20list/

Diego
  • 5,326
  • 1
  • 35
  • 32
  • 1
    Also, "Despite the name, MinGW-w64 **both runs on and builds binaries for** both 32-bit and 64-bit Windows, but you need to make sure you download the right package according to which platform you are running on, and which platform you want to target. " (emphasis mine) http://ascend4.org/Setting_up_a_MinGW-w64_build_environment#MinGW-w64 – Evgeni Sergeev Feb 08 '14 at 23:56
7

One looks like it "cross compiles", from 64 bit to 32 bit, whereas the other looks native.

That was just a quick look though, so I could be a long long way off the mark here......

EDIT: This is only somewhat true. A better explanation is provided here

Ben Stott
  • 2,218
  • 17
  • 23
  • @Ben: That's what I thought (well, 32-bit to 64-bit), but in fact when you try to compile with `-m32` in MinGW-w64, it says "sorry, 32-bit not compiled in". :( – user541686 Apr 11 '11 at 10:00
  • When you build mingw, it may need to be built with the 32-bit extensions. Of course, chances are you're not building MinGW, and thus getting the stock (i.e. 64 bit). They most likely recommend using MinGW for 32 bit builds, and thus don't add in extra options (like -m32) unless you do it yourself. – Ben Stott Apr 11 '11 at 10:02
  • 1
    @Ben: I'm confused... there's MinGW, MinGW-w32, and MinGW-w64. The last one can't cross-compile for 32-bit, and the first two can't cross-compile for 64-bit. I'm not sure I understand what you mean, but my question was whether there's a difference between the first two or not. – user541686 Apr 11 '11 at 10:08
  • Hmm, you know, seems like my answer was wrong - the [FAQ](http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure) suggests that it does the exact same thing as MinGW32 – Ben Stott Apr 11 '11 at 10:13
  • 1
    @Ben: Hm... which part of the FAQ are you referring to specifically? – user541686 Apr 11 '11 at 10:20
  • 1
    Actually, http://openfoamwiki.net/index.php/Tip_Cross_Compiling_OpenFOAM_in_Linux_For_Windows_with_MinGW#Differences_between_mingw32_and_mingw-w32_versions provides a better explanation! I've updated my answer to include this link. – Ben Stott Apr 11 '11 at 10:24
  • Ah, that explains it. Thanks a lot! :) – user541686 Apr 11 '11 at 10:41
6

There's a bit of insight into this in the Wikipedia talk page on the MinGW article. Basically, it appears that the MinGW-w64 project is a fork of the MinGW source base. I have found very little clear information on the details of why the fork happened (although this mailing-list post and this rebuttalimplies it was some form of the usual sort of open-source politics), or of the subsequent differences between the two projects.

To a first approximation, they're the same; the differences will come in in subsequent development.

Brooks Moses
  • 9,267
  • 2
  • 33
  • 57