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

v5.0.2: 2017-03-28

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

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

wang xiaojuan posted a comment on ticket #410
26.04.2017

Hello Tim, have you resolve this issue? I am also getting this problem now

wang xiaojuan posted a comment on ticket #410
26.04.2017

sorry,i'm still having this problom when trying the latest version from the webset,is there any possible reason? setting of anti-virus software?

Duncan Ogilvie posted a comment on ticket #602
26.04.2017

Here is my final code, the function fxclassify is a candidate to replace ___fxclassifyl on x64 (it is correct in the sense that the currently unimplementation FP_UNSUPPORTED flag is returned as FP_NAN). The function hwclassify is inline assembly and this works, I added support for FP_UNSUPPORTED (and if you define unsupported as nan it works). The macro btclassify calls __builtin_fpclassify and should not be used because it is incorrect (admittedly only in certain edge cases where you have a denormal...

Duncan Ogilvie posted a comment on ticket #602
25.04.2017

Okay that code is broken I will try again...

Duncan Ogilvie posted a comment on ticket #602
25.04.2017

I did some more testing where I take all possible sign_exponent and high values that influence the classification according to wikipedia and compare my implementation (with #define FP_UNSUPPORTED FP_NAN) with __builtin_fpclassify and it appears that my implementation is correct (or at least matches the builtin classification): https://ideone.com/RB1sZm I will do some more testing also on the 32 bit version of GCC and mingw-w64 later to see if the 32 bit builtin/software implementation is the same....

Duncan Ogilvie posted a comment on ticket #602
25.04.2017

This code: #include <math.h> int main() { long double ld = 0; unsigned char data[10"> = { 0x5b, 0x01, 0x04, 0x5e, 0x85, 0x00, 0x00, 0x00, 0xd8, 0x59 }; __builtin_memcpy(&ld, data, 10); __builtin_printf("sizeof(long double) = %d\n", sizeof(long double)); __builtin_printf("FP_NAN: 0x%X\nFP_NORMAL: 0x%X\n", FP_NAN, FP_NORMAL); __builtin_printf("fpclassify: 0x%X\n", fpclassify(ld), FP_NAN, FP_NORMAL); } Shows (on GCC 6.3): sizeof(long double) = 16 FP_NAN: 0x0 FP_NORMAL: 0x4 fpclassify: 0x0 And on Apple...

LH_Mouse posted a comment on ticket #602
25.04.2017

Just get some numbers and test it. :> Why don't you just declare the mantissa as a uint64_t ? You could just right-shift it by 62 and switch the result, so if bit 63 and 62 are both zeroes you get 0, and if both are ones you get 3, and so on.

Duncan Ogilvie posted a comment on ticket #602
25.04.2017

Sorry about the swearing I forgot to clean that up lol. Also I agree, just missed that one. Does this look correct? I'm not particularly sure about the bit manipulation stuff... int myclassify(long double ld) { __mingw_ldbl_type_t lds = *(__mingw_ldbl_type_t*)&ld; //https://en.wikipedia.org/wiki/Extended_precision#x86_extended_precision_format auto bit63 = (lds.lh.high & 0x80000000) != 0; switch (lds.lh.sign_exponent & 0x7fff) //Exponent { case 0: //Exponent: All Zeros { if (!bit63) //Bit 63: Zero...

LH_Mouse posted a comment on ticket #602
25.04.2017

default: //Exponent: All other values { if (!bit63) //Bit 63: Zero { return FP_NAN; } ^^^ This is the number in question and it should be FP_UNSUPPORTED in my opinion.

LH_Mouse posted a comment on ticket #602
25.04.2017

Keep an eye on https://gcc.gnu.org/ml/gcc-help/2017-04/msg00101.html. BTW, why the fuck do you want to fuck.lh? :<