GCC for Windows 64 & 32 bits

This is an old revision of the document!


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

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.


  • 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

Paul A Bristow posted a comment on discussion Open Discussion

I would also like to continue using MinGW-w64 standalone builds for using GCC on Windows that I use for simulartaneously testing the Boost libraries using GCC and Clang (and MSVC of course) compilers on Windows. So I loudly join this plea for release of recent GCC releases, especially, for me, the most recent GCC 9 that contains important new constexpr code that provides vital improvements to the code that can be done at compile-time, making a massive run-time improvement (that is NO-time ;-) ) to...

LH_Mouse committed [a1b157]

headers: _FORTIFY_SOURCE: Allow to limit level for individual functions.

LH_Mouse committed [775df0]

headers: _FORTIFY_SOURCE: Limit level for functions which work on raw memory.

E.Naumovich posted a comment on discussion Help

My attempts directly link MSVC lib was not successful. But it was many yars ago. So, I used this stuff to convert, and it worked. Later I linked Borland libs directly. How the things going on now, I dont know. lib fromats might be changed. You simply have to try. I'be back in this business in few weeks, so I can share fresh expirience. But likely it will be libs to link dlls.

Royi posted a comment on discussion Help

Well, having to link to sources outside MinGW64 are exactly my point :-). By the way, I thought MinGW and MinGW64 will be different in this reagrd. By the way, can I use Static Library created with MSVC on a project compiled with GCC on MinGW64? Or must I then use this Object File Converter from Agner Fog?

E.Naumovich posted a comment on discussion Help

I tried it many years ago (may be with gcc 4). Obviously with something simple, not with C runtime. Fact that MinGW links do msvcrt.dll is very common knowledge: https://stackoverflow.com/questions/28783079/mingw-and-msvcrt-dll-confusion https://devblogs.microsoft.com/oldnewthing/20140411-00/?p=1273 and may others...

Royi posted a comment on discussion Help

Is there a guide what should I do? Namely from what format to any other format? Has anyone tried it? By the way, It shoudl be documented somewhere that MinGW64 basically links to the Dynamic Libraray of MSVCRT.

E.Naumovich posted a comment on discussion Help

Likely it will be hardcore violation of the license, copyrights, etc. There https://www.agner.org/optimize/?e=0,34 is util, "Object file converter" you can try. But this idea- to link MS VC runtime statically - looks not good.

Royi posted a comment on a wiki page

Does it mean I can't link static library generated by MSVC to a project compiled by GCC on Windows 64 targeting x64?

Royi posted a comment on discussion Help

How could one, using MinGW64, link to the static Microsoft C Run Time Library? Basically I'm after the equivalent of /MT in Visual Studio in MinGW64. Thank You.