mingw-w64

GCC for Windows 64 & 32 bits

Mingw-w64

Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems. It has forked it in 2007 in order to provide support for 64 bits and new APIs. It has since then gained widespread use and distribution.

The development and community are very active and welcoming with new contributors every month and simple installers.

Version 7 has been released

v7.0.0: 2019-11-10

Notable changes:

  • _FORTIFY_SOURCE support thanks to Christian Franke.
  • Lots of math fixes from Martin Storsjö.
  • Many headers updated from Wine by Jacek Caban.
  • UCRT support by Martin Storsjö.
And many other additions thanks to, but not limited to (in Alphabetical order)

You can also look at the full list of versions.

Headers, Libraries and Runtime

  • More than a million lines of headers are provided, not counting generated ones, and regularly expanded to track new Windows APIs.
  • Everything needed for linking and running your code on Windows.
  • Winpthreads, a pthreads library for C++11 threading support and simple integration with existing project.
  • Winstorecompat, a work-in-progress convenience library that eases conformance with the Windows Store.
  • Better-conforming and faster math support compared to Visual Studio's.

Tools

  • gendef: generate Visual Studio .def files from .dll files.
  • genidl: generate .idl files from .dll files.
  • widl: compile .idl files.

Friend projects

Mingw-w64 interacts a lot with other projects in order to help everyone move forward. Contributions have been going to and coming from these projects:

Most Recent Activity

Brecht Sanders modified a comment on ticket #818
16.11.2019

I did some more tests and figured out -fstack-protector is also needed when linking, not just when compiling. Several projects don't seem to configure their build systems like this (so for I found this to be true for libscrypt and cairo). These libraries did build against MinGW-w64 6.0.0 with the same compiler (GCC 9.2). What exactly changed?

Brecht Sanders posted a comment on ticket #818
16.11.2019

I did some more tests and figured out -fstack-protector is also needed when linking, not just when compiling. Several projects don't seem to configure their build systems like this (so for I found this to be true for libscrypt and cairo. These libraries did build against MinGW-w64 6.0.0 with the same compiler (GCC 9.2). What exactly changed?

Brecht Sanders posted a comment on ticket #818
16.11.2019

Just noticed building cairo (v1.16.0) with MinGW-w64 7.0.0 also fails with undefined reference to '__strncat_chk'

LH_Mouse posted a comment on ticket #818
16.11.2019

No this is the recipe for .o files. You must append -lssp to the recipe for the DLL.

Brecht Sanders posted a comment on ticket #818
16.11.2019

When I add this to Makefile.mingw to make sure the compiler options is specified after the .o files: %.o: %.c $(CC) -c -o $@ $< $(CFLAGS) this is the output: $ make -f Makefile.mingw CC=gcc V=1 && echo OK gcc -c -o crypto_scrypt-nosse.o crypto_scrypt-nosse.c -O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -lssp gcc -c -o sha256.o sha256.c -O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -lssp gcc -c -o crypto-mcf.o crypto-mcf.c -O2 -Wall -g -D_FORTIFY_SOURCE=2 -fstack-protector -lssp gcc -c...

LH_Mouse committed [3ac71e]
16.11.2019

include: add Hyper-V header files

Michael Gooch posted a comment on ticket #737
16.11.2019

why tell us to use msys2? shouldn't other mingw releases be updated as well?

LH_Mouse posted a comment on ticket #819
15.11.2019

Please file a bug report at https://gcc.gnu.org/bugzilla/.

LH_Mouse posted a comment on ticket #818
15.11.2019

Please provide the full linker command line. The order of -l options is significant hence -lssp must follow all .o files.

Doug Semler modified a comment on ticket #819
15.11.2019

simple test program. This should return 1, from main, as the rcx register is 1.2, but it instead returns 0, as xmm0 is 6. (wrong answer can be verified by compiling the mono_test_Winx64_doubleStruct into a DLL (EDIT: WITH MSVC) and calling that instead of the local) typedef struct { double a; } winx64_doubleStruct; int mono_test_Winx64_doubleStruct(winx64_doubleStruct a) { if (a.a < 5.5 || a.a > 7.5) return 1; return 0; } int main(void) { int a; double d = 6; asm("movq $0x3FF3333333333333, %%rcx...