mingw-w64

GCC for Windows 64 & 32 bits

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 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.

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

Pierre modified a comment on discussion Help
30.05.2020

Hello I cannot build any fortran dynamic library with i686-w64-mingw32-gfortran.exe This binary comes with the package mingw64-i686-gcc-fortran-9.2.0-2 in the cygwin distribution for windows X (64b). (I have no other language packages in my cygwin distribution development tools). I want to make a dll from a fortran function and use it in Office 2016 (32b). The fortran function is simple: function test(x) implicit none double precision x, test test=x*3.14159E0 return end I compile this way: i686-w64-mingw32-gfortran.exe...

Pierre modified a comment on discussion Help
30.05.2020

Hello I cannot build any fortran dynamic library with i686-w64-mingw32-gfortran.exe This binary comes with the package mingw64-i686-gcc-fortran-9.2.0-2 in the cygwin distribution for windows X (64b). (I have no other language packages in my cygwin distribution development tools). I want to make a dll from a fortran function and use it in Office 2016 (32b). The fortran function is simple: ~~~ function test(x) implicit none double precision x, test test=x*3.14159E0 return end I compile this way: i686-w64-mingw32-gfortran.exe...

Pierre modified a comment on discussion Help
30.05.2020

Hello I cannot build any fortran dynamic library with i686-w64-mingw32-gfortran.exe This binary comes with the package mingw64-i686-gcc-fortran-9.2.0-2 in the cygwin distribution for windows X (64b). (I have no other language packages in my cygwin distribution development tools). I want to make a dll from a fortran function and use it in Office 2016 (32b). The fortran function is simple: ~~~ function test(x) implicit none double precision x, test test=x*3.14159E0 return end I compile this way: `i686-w64-mingw32-gfortran.exe...

Pierre posted a comment on discussion Help
30.05.2020

Hello I cannot build any fortran dynamic library with i686-w64-mingw32-gfortran.exe This binary comes with the package mingw64-i686-gcc-fortran-9.2.0-2 in the cygwin distribution for windows X (64b). (I have no other language packages in my cygwin distribution development tools). I want to make a dll from a fortran function and use it in Office 2016 (32b). The fortran function is simple: ~~~ function test(x) implicit none double precision x, test test=x*3.14159E0 return end I compile this way: `i686-w64-mingw32-gfortran.exe...

Zufu Liu posted a comment on ticket #842
29.05.2020

msys2 issue https://github.com/msys2/MINGW-packages/issues/6530 the broken package is mingw-w64-x86_64-winpthreads-git-8.0.0.5904.1278c953-1 revert back to mingw-w64-x86_64-winpthreads-git-8.0.0.5814.9dbf4cc1-1 link with -static works.

Zufu Liu posted a comment on ticket #842
29.05.2020

FLAGS is missing in above build command. @echo off SET "DEFINES=-D_WINDOWS -DUNICODE -D_UNICODE -DNDEBUG -D_WIN64 -D_WIN32_WINNT=0x0502 -DWINVER=0x0502" SET "FLAGS=-municode -Wall -Wextra -Wshadow -Wimplicit-fallthrough -Wformat=2 -O2 -ffast-math -fomit-frame-pointer" SET "CFLAGS=-std=gnu11 %FLAGS% %DEFINES%" SET "CXXFLAGS=-std=gnu++17 -fno-rtti %FLAGS% %DEFINES%" SET "LDLIBS=-lkernel32 -luser32 -lgdi32 -lcomctl32 -lcomdlg32 -ladvapi32 -lshlwapi -lshell32 -lole32 -loleaut32 -luuid -luxtheme -lpsapi"...

Zufu Liu created ticket #842
29.05.2020

linker errors caused by mbrtowc.c and wcrtomb.c

Henry Arthur Garcia created ticket #841
28.05.2020

gcc 11.0 git build fails

OJ Reeves created ticket #840
27.05.2020

Obscure issue compiling/linking Windows binaries on Linux

oset jan modified a comment on discussion Help
26.05.2020

Thanks for advice. I have tested it and it works. Not a perfect solution but works. Unluckily '-fleading-underscore' indeed doesn't work. And when comes to dll, thank you as well but it's just 1.6k of code. It meant to be included.