TDM's GCC/mingw32 Builds
Binary packages of recent GCC releases targeting the MinGW compiler system
Main Page | Development Information | Bugs
Consider making a donation to support the TDM-GCC project:

Donate through SourceForge
Recent Donors:
Yiannis Mandravellios & Code::Blocks
Robert H Fletcher
Douglas Hodson
Francesco Biscani ("bluescarni")
"dwmcqueen"
Donate through SourceForge
Recent Donors:
Yiannis Mandravellios & Code::Blocks
Robert H Fletcher
Douglas Hodson
Francesco Biscani ("bluescarni")
"dwmcqueen"
Last updated: 2009-05-02 16:57
in a nutshell
The TDM-GCC builds are unofficial replacements for the official MinGW releases
of GCC binaries. TDM-GCC was previously recommended for experimentation
purposes only, but constant use in day-to-day development and a total download
count of over 50,000 have proven the TDM-GCC releases to be at least as usable
as the most recent official MinGW GCC release. Therefore, TDM-GCC is now
heartily endorsed for production use in any non-critical environment, with only
the following caveats:
- TDM-GCC is not formally affiliated with or endorsed by the MinGW project (although several MinGW team members make use of it)
- No level of support for TDM-GCC is in any way guaranteed (although a best effort is made to fix bugs as they are found or forward them to GCC Bugzilla)
IMPORTANT: 4.4.0-tdm-1 r2!
A fairly prominent bug was quickly discovered in the first release of GCC 4.4.0 TDM-1, the symptoms of which are multiple definitions of libgcc's internal _Unwind_* functions when an import library created with "--export-all-symbols" is used. If you downloaded the 4.4.0 release before this message appeared, please re-download the latest packages! The TDM/MinGW installer should, as usual, perform the upgrade automatically. If you downloaded and installed the packages manually, the only changed components are core, g++, and fortran (the new archives' names end in "-2").
A fairly prominent bug was quickly discovered in the first release of GCC 4.4.0 TDM-1, the symptoms of which are multiple definitions of libgcc's internal _Unwind_* functions when an import library created with "--export-all-symbols" is used. If you downloaded the 4.4.0 release before this message appeared, please re-download the latest packages! The TDM/MinGW installer should, as usual, perform the upgrade automatically. If you downloaded and installed the packages manually, the only changed components are core, g++, and fortran (the new archives' names end in "-2").
download
| Release | Download | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
TDM/MinGW Installer 1.905.0 Released 2009-05-02 |
Bundled Installer:
[tdm-mingw-1.905.0-4.4.0-2.exe]
(26.0 MB) Includes C and C++ SJLJ packages from GCC 4.4.0 TDM-1 (r2), plus binutils (2.19.1), mingw-runtime (3.15.2), w32api (3.13), mingw32-make (3.81-20080326-3) and gdb (6.8-mingw-3). |
|||||||||||||||||||||
|
On-Demand Installer:
[tdm-mingw-1.905.0-webdl.exe]
(338 KB) No bundled packages; the packages selected in the installer will be downloaded on-demand. |
||||||||||||||||||||||
|
(GCC Current Series) 4.4.0-tdm-1 (r2) Released 2009-05-02 |
|
|||||||||||||||||||||
|
(GCC Previous Series) 4.3.3-tdm-1 Released 2009-02-15 |
|
|||||||||||||||||||||
|
All TDM-GCC packages, including previous releases and source code, are
available for download from the
TDM-GCC download page
on SourceForge.
|
||||||||||||||||||||||
GCC is supposed to support language XYZ! Why isn't there a language pack
available for it?
See the development page for details on languages that don't currently compile -- maybe you can provide a patch or alternate build command so that they can!
See the development page for details on languages that don't currently compile -- maybe you can provide a patch or alternate build command so that they can!
installation
SJLJ or Dwarf-2 Unwinding:As a general rule, you should choose the default SJLJ packages, unless you know you need faster exception handling and can guarantee you'll never need to unwind through non-DW2-compiled stack frames (such as a Windows callback). If you chose the DW2 packages, consider removing the "-dw2" suffix from the program names. See README-gcc-tdm.txt, included in the core package, for further notes on this topic.
TDM/MinGW Installer:
Using the TDM/MinGW installer is highly recommended; it can automatically install TDM-GCC (or the official MinGW GCC) as well as all supplementary MinGW base system packages. The installer uses a standard wizard interface with reasonable defaults.
Do not use the TDM/MinGW installer to install on top of a previous MinGW installation that was not created by it.
Manual Installation:
These binary packages are designed as drop-in replacements for the MinGW project's official gcc packages. When using these packages, you are encouraged to start with a clean slate and install only the MinGW packages which are necessary to you. You'll need the following packages for basic Windows development:
- binutils (binutils-2.19.1-mingw32-bin.tar.gz, 8.51MB)
- mingw-runtime (mingwrt-3.15.2-mingw32-dev.tar.gz, 552KB)
- w32api (w32api-3.13-mingw32-dev.tar.gz, 1.55MB)
- mingw-utils (mingw-utils-0.3.tar.gz, 1.51MB)
- mingw32-make (mingw32-make-3.81-20080326-3.tar.gz, 220KB)
- gdb (gdb-6.8-mingw-3.tar.bz2, 1.99MB)
Decide whether to use the SJLJ or DW2 (Dwarf-2) exception model. Then, for the exception model of your choice, download at least the "core" TDM-GCC package, which includes the required base files as well as support for the C language. You can also download any or all of the other TDM-GCC packages, depending on which of GCC's supported languages you'd like to use.
Extract the MinGW packages to an empty directory -- typically C:\MinGW. Then, extract the TDM-GCC package(s) and choose to overwrite any duplicate files that may exist. Finally, consider adding the bin directory to your Windows PATH environment variable.
You can browse all released packages and source packages at the TDM-GCC download page on SourceForge. Beginning with the 4.3.0 release, all TDM-GCC releases are now available as gzipped tarballs or zip archives. Previous releases require 7-Zip for unarchiving.
usage notes
"Graphite" Loop TransformationsThe TDM release of GCC 4.4.0 includes support for GCC 4.4's Graphite loop transformation infrastructure. Because support for these optimizations is currently optional, they are not enabled at any of the -O optimization levels. If you are interested in using them, the relevant options are "-floop-interchange", "-floop-strip-mine", and "-floop-block", and they are documented here.
Dwarf-2 vs. SJLJ unwinding:
GCC supports two methods of stack frame unwinding: Dwarf-2 (DW2) or SJLJ (setjmp/longjmp). DW2 unwinding is desirable for a number of reasons, but cannot yet (on Windows) pass exceptions through "foreign" stack frames (code compiled by another non-DW2-enabled compiler, such as OS DLLs in a Windows callback). This means that you should choose the SJLJ version of TDM-GCC unless you can be certain you will never throw an exception through a foreign stack area. See README-gcc-tdm.txt, included in the core package, for further usage notes on this topic.
Warnings and errors:
GCC 4 represents a significant step forward in optimization capabilities, error detection, and standards compliance, and this is more true than ever with the most recent GCC releases. For you, the end user, this will mean that code which compiled and ran without problems on previous GCC releases will almost certainly exhibit some warnings and maybe even a few errors.
These meaningful warnings and errors are a very good thing, as they help the programmer to write safer and more correct code. Unfortunately, there's also a chance you might encounter incorrect warnings or errors, ICE's (internal compiler errors, where the compiler makes a mistake and has to bail out), or even miscompilations (where your code is incorrectly compiled and produces the wrong result).
If you encounter an ICE while using a TDM-GCC build, feel free to file a bug report (see the Bugs page). With any other unexpected problem, you are urged to work from the assumption that it stems from user error, and ensure that your code is correct and standards-compliant.
Exceptions and DLLs:
The 4.3 and 4.4 series TDM-GCC releases should fully support throwing exceptions across DLL boundaries. See README-gcc-tdm.txt, included in the core package, for further notes on this topic.
OpenMP and pthreads-w32:
The TDM-GCC releases include support for OpenMP. Be sure to read the file README-gcc-tdm.txt, included in the core package, for usage notes on this topic.
Local Fixes and Changes:
See the Development page for information on patches to the vanilla sources included in the TDM-GCC releases.
bugs and known issues
- Under rare and as-yet-unidentified circumstances, inclusion of a precompiled header will cause compilation to fail with an error like "error: calling fdopen: bad file descriptor or file name". It seems only to happen when the PCH is double-included by both an #include directive and the -include command-line switch, but this in itself will not trigger the bug.
source code
The source code for the TDM-GCC binary releases is available from the
TDM-GCC download page
on SourceForge. It is distributed in the form of the original ("vanilla")
separate source packages as downloaded, plus an additional "TDM Sources"
package. The TDM Sources package includes unified diffs of any changes made to
the vanilla sources, as well as the set of scripts used to build the binary
releases.license
The TDM-GCC packages contain binary distributions constituting a work based on
GCC, CLooG, and PPL, all of which are licensed under the GPL. For further
details, refer to the file "COPYING-gcc-tdm.txt" within the downloaded package.
Additionally, TDM-GCC contains binary files constituting works based on
libiconv, GMP, MPFR, and pthreads-w32, all of which are licensed under the LGPL;
COPYING.lib-gcc-tdm.txt contains a copy of the LGPL.The TDM-GCC distribution is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
TDM-GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
