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

Peter lloyd posted a comment on discussion Open Discussion

i do hope you gurus out there can help, im trying to install a program on windows 7, tiny7, which says it cant find the noted dll, i copied the said file fron fix4dll and others but it still seems to fail. one site had numrous file with diferent md5 associates but no guide how to choose. ive trid registering the dll via regsvr32 but it cant find the dllregserver, so not valid. it is a 32 bit system. when i checked the exe with dllist etc. it fid hsow this was a problem. any help would be appreci...

Rahul Das posted a comment on discussion Help

Thanks for the response. I am following below wiki available at MinGW-w64 FAQ section - Compiling a Multilib Toolchain For native windows builds you need to use here junction points https://sourceforge.net/p/mingw-w64/wiki2/Answer%20Multilib%20Toolchain/ I tried replacing /d switch (creates a symbolic directory link) with -/j switch (creates a directory junction) but the results are same. Any further guidance...

Doug Semler posted a comment on discussion Help

whoa dude way wrong group for this. msys2 maybe? bash on windows is...problematic when running windows native cmd commands with the quote and slash requirements. btw symlinks on windows just are not a thing. administrator ptivileges to create true junctions...etc. don't bother wasting your time.

Rahul Das posted a comment on discussion Help

I would appreciate if someone can help me with below script as I am failing to make it work. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23#!/bin/sh directory=/c/Temp ar='mpfr-4.0.2.tar.xz' cd "${directory}" && tar -xf "${ar}" linkname="${ar%-*}" target="${directory}/${ar%.tar*}/" # Uncommenting below line creates a valid symlink in Windows 7 from Msys2; screen attached # cmd //c 'mklink /d mpfr c:\temp\mpfr-4.0.2' # However if I try same with variables, single quote prevents the substitution...

Maciej Madajczyk posted a comment on discussion Help

Hi I try to build libSDL2.a library from SDL2.dll. I create def file (def file is correct) from dll and then .a file: dlltool -d SDL2.def -l libSDL2.a Copy libSDL2.a to lib directory. So far so good. But when I try to build the simplest program : ... int main(){ SDL_Init(SDL_INIT_VIDEO); return 0; } with : gcc -lSDL2 a.c -o a.exe I got linker error: undefined reference to 'SDL_Init'. I know what this means and indeed, in the file libSDL2.a I have got function '__imp_SDL_Init' not 'SDL_init'. Somebody...

LH_Mouse committed [823bc2]

headers: define various *_EPSILON in float.h.

Roland Hughes posted a comment on discussion Help

This is the file you should have downloaded I humbly suggest you don't install just MinGW-W64 though. Instead install MSYS2. It will install mingw-w64 while providing a tree and packages for mingw 32-bit in case you need it. You will also get a terminal shell.

Ken Goldman posted a comment on discussion Help

I downloaded mingw-w64-v7.0.0. I don't see any obvious README, INSTALL, or other instructions. It also seems to be the source, not binaries. Are there install instructions for this package?

Jacek Caban committed [41bcbb]

headers: Update imported headers to current Wine version.

Jacek Caban committed [c8e562]

headers: Import dxva.h from Wine.