mingw-w64

GCC for Windows 64 & 32 bits

This is an old revision of the document!


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 5 has been released

v5.0.4: 2018-06-04

  • Fix gcc-8.1.0 compatibility regarding _xgetbv
  • %e printf specifier will now produce at least 2 digits for the exponent.

initial v5 Release: 2016-10-19

  • Fixes to the __mingw_printf family of functions.
  • DirectX updates from Wine.
  • Various updates to support Windows 7 and 10.
  • Various header typo fixes.

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

Martin Storsjö posted a comment on ticket #823
21.01.2020

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
21.01.2020

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]
20.01.2020

configure: Deprecate directx SDK option.

Jacek Caban committed [3efdce]
20.01.2020

headers: Get rid of check for DX headers presence.

Jacek Caban committed [f183d3]
20.01.2020

headers: Get rid of _mingw_directx.h.

Jacek Caban committed [3f9223]
20.01.2020

headers: Remove remaining direct-x directory usage.

Kai Tietz posted a comment on discussion Help
20.01.2020

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
17.01.2020

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]
15.01.2020

thumbcache.idl: import from wine

Didier Castellacci created ticket #153
11.01.2020

Compilation problem with -Wl, -rpath,