GCC for Windows 64 & 32 bits

This is an old revision of the document!


Mingw-w64 brings free software toolchains to Windows. It hosts a vibrant community which builds and debugs software for Windows while providing development environment for everyone to use.

It has forked mingw.org in order to move forward and provide 64bit support and support for new APIs and has brought countless improvements since its creation in 2007.

Version 4.0 has been released

  • 32bit ARM thumb software math (Thanks to André Hentschel!).
  • New ftw() support for gcc-5.x support.
  • Experimental printf changes - Ability to print 128bit integers (%I128*) and Decimal Floats (%H, %D), disabled by default. Build the CRT with —-enable-experimental to use.
  • Updated OpenGL 4.5 headers.
  • Better DirectX 11 support.
  • Better Windows 7, 8/8.1 API support.

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.

Previous Versions


  • Required for GCC 4.8.
  • Much improved floating point math performance.
  • Improved MSVC intrinsics performance.
  • Addition of wide variants in C99 printf and scanf.
  • Partial C1X secure CRT support.
  • Partial MS Secure CRT templates for C++.
  • Vastly improved Windows 7 and 8 win32 API support.
  • POSIX-style Large File Support.
  • Winpthread: new library, pthreads implementation for Windows.
  • Winstorecompat: new library for Windows Store compatibility (WIP).


  • Expanded Windows Vista/7 API support.

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.