How do I invoke the MinGW cross-compiler on Linux?

If you look at the file lists on the Ubuntu package webserver for mingw-w64‘s constituent packages: gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev You can see that mingw-w64 provides a toolchain, i.e. a set of alternative tools (compiler, linker, headers, etc.) used to compile your code for another system. Assuming you want to compile … Read more

How do I compile and link a 32-bit Windows executable using mingw-w64

That depends on which variant of toolchain you’re currently using. Both DWARF and SEH variants (which come starting from GCC 4.8.0) are only single-target. You can see it yourself by inspecting the directory structure of their distributions, i.e. they contain only the libraries with either 64- or 32-bit addressing, but not both. On the other … Read more

mingw-w64 installer “the file has been downloaded incorrectly”

Old post but same problem, the installer doesn’t seem to work. I give the solution which works for me You can directly download the archive of MinGW64 with your chosen configuration : https://sourceforge.net/projects/mingw-w64/files/mingw-w64/ Once the compressed file downloaded, you have just to extract and copy/paste the MinGW64 folder( with the pre-compiled librairies) to your chosen … Read more

Using C++11 futures: Nested calls of std::async crash: Compiler/Standard library bug?

Since this answer is still “unanswered,” after talking with some people from Lounge<C++>, I think I can say that it’s pretty obvious from the comments that this is due to an implementation error either on MinGW/MinGW-w64’s or pthread’s part at the time. Using gcc 4.9.1, MinGW-W64, the problem does not appear anymore. In fact, the … Read more

How to add man and zip to “git bash” installation on Windows

Here’s another, slightly different, set of instructions to install zip for git bash on windows: Navigate to this sourceforge page Download zip-3.0-bin.zip In the zipped file, in the bin folder, find the file zip.exe. Extract the file zip.exe to your mingw64 bin folder (for me: C:\Program Files\Git\mingw64\bin) Navigate to to this sourceforge page Download bzip2-1.0.5-bin.zip … Read more