GCC for Windows 64 & 32 bits


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.


  • 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

Martin Storsjö posted a comment on ticket #823

See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/crt/io.h#L364-L371 and https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=config/mh-mingw;h=a795096f038f26f2db70f72487ca2665b9e7097e;hb=b31f80231df9ce6d9b50c62d28b8d2a4654ef564#l1, it's a long known issue that access() doesn't work if X_OK is set, the same issue was present even in msvcrt.dll on Vista. Therefore, GCC already should be setting the flag -D__USE_MINGW_ACCESS to get a workaround enabled.

Jerry posted a comment on discussion Help

Hi Kai, Thanks for ur advice! do u know how to apply a patch file like the one above on windows system? !!

Jacek Caban committed [00331a]

configure: Deprecate directx SDK option.

Jacek Caban committed [3efdce]

headers: Get rid of check for DX headers presence.

Jacek Caban committed [f183d3]

headers: Get rid of _mingw_directx.h.

Jacek Caban committed [3f9223]

headers: Remove remaining direct-x directory usage.

Kai Tietz posted a comment on discussion Help

Hello Jerry, well, not sure what those headers are. They seem not to belong to our provided system-headers. Nevertheless you are right that - if the header file exists - you can include it via '#include' C preprocessor statement. I am a bit confused by your expression "include most libraries". If you mean include API definition for a library, well. Otherwise a header is not enough for using a library. You will need to add it to your link command option, so it is used. Regards, Kai Am Mo., 30. Dez....

Doug Semler posted a comment on ticket #153

rpath is not used on windows. DLLs are loaded as described https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

Jacek Caban committed [06bc95]

thumbcache.idl: import from wine

Didier Castellacci created ticket #153

Compilation problem with -Wl, -rpath,