Difference between revisions of "MinGW installation"

From Code::Blocks
Line 53: Line 53:
 
====gdb debugger====
 
====gdb debugger====
 
*[http://prdownloads.sf.net/mingw/gdb-6.3-2.exe http://prdownloads.sf.net/mingw/gdb-6.3-2.exe]
 
*[http://prdownloads.sf.net/mingw/gdb-6.3-2.exe http://prdownloads.sf.net/mingw/gdb-6.3-2.exe]
==Other developer tools==
+
==Development Tools==
 
===UnxUtils===
 
===UnxUtils===
 
Ports of the most often used Unix utilities. Note that some tools in UnxUtils are quite a bit outdated, so make sure you <u>do not</u> overwrite already existing MinGW files with their UnxUtils counterparts.
 
Ports of the most often used Unix utilities. Note that some tools in UnxUtils are quite a bit outdated, so make sure you <u>do not</u> overwrite already existing MinGW files with their UnxUtils counterparts.

Revision as of 16:35, 25 December 2015

Install the MinGW Bundled Package

The fastest way to set up a working compiler is to install packages of recent GCC releases targeting the MinGW compiler system, from TDM-MinGW installer . The Code::Blocks team recommends TDM builds of MinGW.

If you want to download each packages yourself, you can follow the chapters below.

Using the MinGW installer

Note: At the present time, it is still best to download the packages by hand, as the installers are not production quality (unless you really feel unsure about unpacking a couple of archives).

Also, the installer reportedly does not work on Windows Vista, follow the manual installation instructions.
(In general, MinGW is not confirmed to work for any Windows Vista betas or RCs)

MinGW has been confirmed working in Windows Vista Business! Thanks to Aaron Giles' Solving the Windows Vista Build Issues for the solution. In summary, the MinGW folder must be "a directory immediately off the root of your hard disk for some reason. So c:\mingw works fine, but c:\tools\mingw won’t." (You can use mklink to symbolic-link the folder, which also works). Secondly, set the GCC_EXEC_PREFIX environment variable to the MinGW root folder. Finally, add %GCC_EXEC_PREFIX%\libexec\gcc\mingw32\3.4.5 and %GCC_EXEC_PREFIX%\lib\bin to the PATH environment variable.

A HowTo exists here


MinGW Installer 5.02 allows to choose the SF mirror while 5.03 does not (automatically picks one randomly).

MinGW Installer 5.0.x are broken because of changes done by sf.net; please use the MinGW Installer 5.1.x

Installers allows to downloads/installs "previous", "current" and "candidate" mingw packages.

Note that the MinGW version number is not related to the actual compiler version.

Note that the installer applications require an internet connection and will download the actual MinGW packages at the time of installation.

The required MinGW Components are "MinGW Base Tools", "g++ compiler" and "MinGW make".

GCC 3.4.5 manual install

This is the "candidate" release of MinGW, so it is not considered "stable" officially.
Personally, I have not had any kind of problem with this release.

To do a manual install, simply download the desired files and extract them all into the same directory. If you have WinZip, PowerArchiver, or any other similar program, this is as easy as selecting all the archives simultaneously and choosing "unpack here" from the context menu.

For clarity, I recommend to put MinGW into C:\MinGW, but almost any other locations should do equally well. Avoid pathnames with spaces or exotic characters, as this may confuse some commandline tools (most notably gdb).

Base system with C++

Optionally:

Fortran77 compiler

gdb debugger

Development Tools

UnxUtils

Ports of the most often used Unix utilities. Note that some tools in UnxUtils are quite a bit outdated, so make sure you do not overwrite already existing MinGW files with their UnxUtils counterparts.

GnuWin32

More recent versions of commonly used Unix utilities. Also: utilities not found in UnxUtils at all.

Dependencies:

Resulting Folder Layout

Lay.png


GCC 3.4.4 manual install

Some people have reported various problems with gcc version 3.4.4, so it may be worth a consideration to use the either the 3.4.5 or 3.4.2 releases until a build from the 4.x branch is available.
Personally, I have not had any kind of problem with either 3.4.4 or 3.4.5.

Base system with C++

Optionally:

gdb debugger

Objective-C

Native Java (experimental)

Fortran-77

Ada


Other MinGW links

Unofficial MinGW package From Equation.com