Getting StartedTable of Contents: MinGW-based "TDM" edition, and the MingW-w64-based "TDM64" edition. Both editions are based on the same set of tools and provide similar or identical functions. You may install both editions on the same PC, though not in the same directory.
- only supports creating 32-bit programs.
- is more mature and has a more stable codebase.
- is already supported by a wide variety of open-source software.
- supports creating 32-bit or 64-bit programs.
- is a younger fork of MinGW.
- undergoes heavier day-to-day development.
- has a smaller (but growing) list of open-source software that supports it.
SJLJ or DW2?The MinGW/TDM edition of TDM-GCC additionally offers two different methods of exception handling for your programs: SJLJ (setjmp/longjmp) and DW2 (Dwarf-2). 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 choose the DW2 packages, consider removing the "-dw2" suffix from the program names. See "SJLJ unwinding vs. DW2 unwinding" in the README for further notes on this topic.
The MinGW-w64/TDM64 edition currently only supports SJLJ unwinding.
There are "bundle" installers for each edition that contain a standard toolchain consisting of the C and C++ compilers and associated tools, the runtime libraries and headers, GNU make, and GDB (the GNU source-level debugger). There is also an "on-demand" installer that contains no packages, but will automatically download and install the specific set of packages that you choose. Finally, for those who need or prefer a manual installation, zip and tar.lzma archives of each individual package are also available.
Do not install TDM-GCC to "C:\MinGW"!
Previously, the recommended path to install MinGW at was "C:\MinGW". This is no longer the case -- because other versions of GCC search that path for headers and libraries even if they are not installed there. TDM-GCC has been patched to fix this problem, but most other MinGW/GCC distributions have not. This means that if you have more another installation of MinGW or MinGW-w64, it will always search for headers and libraries in "C:\MinGW", and you'll probably end up using the wrong headers and libraries inadvertently. Therefore, it's now recommended that you use a different path for your installation.
In the MinGW-w64/TDM64 edition, use "-m32" and "-m64" to control whether 32-bit or 64-bit binaries are generated.
By default (if neither -m32 nor -m64 is specified), this edition will generate 64-bit binaries. In a 64-bit binary, all pointer math is 64-bit by default, and the built-in "size_t" and "ptrdiff_t" types are 64 bits in size (some other types are larger also). Additionally, the following preprocessor definitions will be in effect:
- #define _WIN64 1 (also WIN64, __WIN64, and __WIN64__)
- #define __MINGW64__ 1
- #define __x86_64 1 (also __x86_64__)
- #define __amd64 1 (also __amd64__)
Because the MinGW project provides its own official binary packages, you should only seek help from the MinGW forums for those packages. If you have a problem using the MinGW edition of TDM-GCC, make sure it also applies to the official MinGW packages before posting it to the MinGW project.
DO seek help for MinGW-w64/TDM64 issues from the MinGW-w64 project.
The administrators of the MinGW-w64 project have expressed their approval of the TDM64 edition of TDM-GCC as a binary distribution of MinGW-w64. If you have an issue relating to MinGW-w64 or the x86_64-w64-mingw32 target of GCC, you may request help from any of MinGW-w64's support venues including SourceForge PR trackers, a mailing list, and an IRC channel (see <http://mingw-w64.sf.net/> for further information).
Use TDM-GCC's SourceForge trackers as a last resort.
Because TDM-GCC is primarily a binary distribution of sources provided by other projects, with only miminal changes, the majority of issues you encounter will probably be present upstream as well. Because of this, and because of a lack of manpower to appropriately support TDM-GCC on its own, please only post issues that specifically relate to TDM-GCC, but not its upstream projects (GCC, binutils, MinGW, and MinGW-w64) on the TDM-GCC SourceForge trackers. If you have encountered an issue with the MinGW edition of TDM-GCC, you can use the TDM-GCC installer to create a MinGW installation with the MinGW project's own official packages, and see whether or not the issue is also present there.