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

v6.0.0: 2018-09-17

Notable changes:

  • C++ __cxa_atexit thanks to Martin Storsjö and Liu Hao
  • Massive additions to support UCRT thanks to Martin Storsjö
  • Sync COM interface headers with Wine development thanks to Jacek Caban
  • WinRT additions thanks to Hugo Beauzée-Luyssen
  • ARM32 and ARM64 additions thanks to Martin Storsjö
  • CRT library api-ms-win-core additions thanks to Martin Storsjö
  • CRT library def file reorganization thanks to 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

Brecht Sanders posted a comment on ticket #149
13.11.2019

Problem seems to be solved in the meantime.

LH_Mouse posted a comment on ticket #818
13.11.2019

Check your linker command line to make sure -lssp exists (note it is a GCC library so it must exist unless your toolchain is broken). You probably have to add it in LDADD if you also have -nostdlib.

Ayman Salah posted a comment on discussion Help
13.11.2019

I was able to fix the issue by adding -D_UCRT to cpp and cc1plus parts of the spec file. I did so after checking stdio.h and finding that what seems like scanf definitions are wrapped in a "#ifdef _UCRT".

Ayman Salah modified a comment on discussion Help
13.11.2019

Hi all, I have the following questions: 1. What are libucrt.a and libucrtbase.a exactly? 2. Why does libucrt.a only contain definitions for printf but not scanf? Is it to be done in the future or should I hack my way around it? I currently have created an import library for VCRUNTIME140.DLL and modified GCC spec file to link to -lvcruntime140 and -lucrt instead of -lmsvcrt but I am getting undefined scanf errors. I have seen files named like this one "ucrt_vsprintf.c" which I believe act as the bridge...

Ayman Salah posted a comment on discussion Help
13.11.2019

Hi all, I have the following questions: What's libucrt.a and libucrtbase.a exactly? Why does libucrt.a only contain definitions for printf but not scanf? Is it to be done in the future or should I hack my way around it? I currently have created an import library for VCRUNTIME140.DLL and modified GCC spec file to link to -lvcruntime140 and -lucrt instead of -lmsvcrt but I am getting undefined scanf errors. I have seen files named like this one "ucrt_vsprintf.c" which I believe act as the bridge from...

Brecht Sanders posted a comment on ticket #818
13.11.2019

Because then I had other issues. If I leave it in I get: R:\winlibs32-9.2.0-7.0.0\libscrypt-1.21/crypto_scrypt-check.c:17: undefined reference to `__stack_chk_guard' d:/prog/winlibs32-9.2.0-7.0.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe: R:\winlibs32-9.2.0-7.0.0\libscrypt-1.21/crypto_scrypt-check.c:104: undefined reference to `__stack_chk_guard' d:/prog/winlibs32-9.2.0-7.0.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/9.2.0/../../../../i686-w64-mingw32/bin/ld.exe:...

LH_Mouse posted a comment on ticket #818
13.11.2019

Why did you remove -fstack-protector? In mingw-w64 _FORTIFY_SOURCE requires either -lssp or -fstack-protector to work.

Brecht Sanders posted a comment on ticket #818
13.11.2019

Seems similar to this post in the mailing list: https://sourceforge.net/p/mingw-w64/mailman/message/36764708/ At the end of the thread there was a mention of a patch being pushed. Was this not included in release 7.0.0 released at the following link? http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/

Brecht Sanders created ticket #818
13.11.2019

undefined reference to `__strcpy_chk' with -D_FORTIFY_SOURCE=2 or -D_FORTIFY_SOURCE=1

LH_Mouse committed [a4de8d]
12.11.2019

crt/gdi32: update import library