There are several ways to install MinGW software on your computer. For example, you can compile whole MinGW software by yourself, or you can just install MinGW software distribution with a few clicks. The following steps are the simplest and quickest guide to install MinGW software.
You need the following configurations on your computer to install MinGW software according to this guide:
Disk space of 500 MB
An operating system of any version of Microsoft Windows since Windows XP or newer
Internet connection
Download a self-extracting archive with the latest version of the MinGW software distribution from the following web page:
You will find two types of distribution here: one with Git and one without Git. Git is an open source distributed revision control system. I suggest you install the version with Git because it contains Bash command shell. This is a comfortable alternative for the standard Windows Command Prompt. For example, the Bash shell provides the autocomplete function that will complete the typed commands and pathnames by pressing the Tab key. Also the command history is available by pressing up and down arrows.
Run the self-extracting archive. Specify the target directory and click on the Extract button.
Suppose that you choose C:\
as the target directory. The archive will be extracted to C:\MinGW
. I strongly recommend you not to install MinGW software in C:\Program Files
. There are problems with paths containing spaces.
Run the set_distro_paths.bat
script in C:\MinGW
after the archieve extraction. It will add the MinGW software directory to the PATH
system variable for integration with the Windows Command Prompt and Bash shell. This script does not work properly on Windows Vista and Windows 7. Check the MinGW directory existence in the PATH
variable after executing it.
Congratulations! You have got the linker, C, and C++ compilers on your computer with header files and libraries for Windows API. Boost, GLEW, SDL, PCRE, Free Type, Vorbis, and many more libraries have been installed too. Moreover, there is profiler, Bash shell, Git, and other utilities.
There are several other ways to install MinGW software. One of them may be more suitable for your goals.
The installation process described earlier refers to the unofficial distribution of the MinGW software with additional libraries and utilities. It may seem doubtful for users accustomed to proprietary software, but this is common practice for open source users. The third-party distributions are more usable and complete than official ones in some cases. This is achieved by integrating several relative open source products into one distribution. GNU Linux distribution is a typical sample of this practice.
You can download and install the official distribution of MinGW software from the following developers' website:
I recommend you use the mingw-get
installer application with a text-based interface. You can get a list of all the available packages by executing the following command:
$ mingw-get list
Execute the following command to install the necessary packages (for example, GCC, G++, GDB):
$ mingw-get install gcc g++ gdb
A more detailed instruction manual is available at the official MinGW website. You can simply install extensions for MinGW software using the mingw-get
application.
The 64-bit MinGW software version is available from the MinGW-w64
fork. Fork is an alternative branch of mainstream software development. The goal of any fork is to achieve specific software features. MinGW-w64 is a completely different software package than MinGW with its own staff of developers. However, the basic principles of MinGW and MinGW-w64 are the same. All knowledge gained in this book you can apply to MinGW-w64 software. The following website is for the MinGW-w64 project:
http://mingw-w64.sourceforge.net
You can download the archive with MinGW software from here and unpack them. After unpacking you will get a ready-to-use MinGW software.
The following is the website of a MinGW-w64 software's unofficial distribution:
This distribution provides a more flexible configuration of the installable components than the official one. The installation will be performed through the standard Windows Installation Wizard application.
MinGW software is supplied with some open source IDE. For example, such integrated product is available on Code::Blocks, official website http://www.codeblocks.org.