MinGW-w64 Build Script 3.0.5

This version is outdated, the newest release of this script can be found at: http://ffmpeg.zeranoe.com/blog/?cat=4

This is a new release of my MinGW-w64 Build Script


Some key features of this script are:

  • Builds both Win32 and Win64 toolchains.
  • Checks for missing packages before the compile begins.
  • Builds are “full featured” toolchain (ppl and cloog).
  • Can choose between a Win32 or Win64 build, or choose to compile both.
  • Automatically detects a previous built toolchain and updates the toolchain instead of a full rebuild.
  • pthreads is automatically built and installed.
  • Builds a toolchain that can compile FFmpeg for Win32 and Win64, along with the external libraries.
  • Automatically stops the script if any package fails to build.
  • Support for make “jobs” which will use multiple CPU cores/threads.
  • Allow user to choose which version of GCC, Binutils, and MinGW-w64 to build.
  • Allow for a fully static build.
  • Clean the build after the build finishes.
  • Allow the user to select which languages to build into GCC.
  • Allow the user to build without NLS support
  • Support for command line arguments, see –help for more information

Some changes/fixes from version 3.0 are:

  • Update MPFR to version 3.1.1
  • Fix a ‘include’ folder location issue.


Please download and try it, even if you don’t want to use the resulting toolchain I could use some feedback and bug reports.

I made sure that it’s simple yet effective, you wont be prompted for most things (though if you would like more prompts then feel free to ask/recommend).

This script has been tested on Ubuntu 64-bit, Ubuntu 32-bit, Debian 64-bit, and it should work on any Linux that supports bash.


Download it here: http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.0.5

or and archive here: http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.0.5.tar.xz


Here are the steps to get the script running:

  1. Download it here: http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.0.5 or the command line way (make sure your in the directory you want to save it to): wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.0.5 The script is also available in a xz archive if you need would like that instead: http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.0.5.tar.xz
  2. Save it to the directory that you want MinGW-w64 to build in, e.g: /home/<username>/software/mingw-w64 or ~/software/mingw-w64
  3. Change to that directory from the terminal: cd ~/software/mingw-w64 (or whatever path your using).
  4. Change the permissions of the script so that it can be executed by you: chmod 755 ./mingw-w64-build-3.0.5
  5. Run the script: bash ./mingw-w64-build-3.0.5


The script is released under GPL v3.0

Leave a Reply