Clone wiki

gdc / MinGWDocumentation

The information on this page supplements User Docuementation. It is geared towards changes made by mingw-gdc.

Table of Contents:


mingw-gdc started as a means to experiment with features relating to MinGW without disturbing GDC. Some features will never find a home within GDC and others are awaiting third party patch acceptance.

mingw-gdc differences

The features listed here are only available from the mingw-gdc patches.

  • Ability to have one installation for D1 and D2.
  • Removal of 'main' function from Phobos. This caused issues when trying to link with -mwindows.
  • OS TLS support. Currently GCC TLS emulation cannot work with garbage collectors.
  • Various changes required for MinGW64 support.
  • Phobos links with libws2_32.a. Required by std.socket.
  • dllexport applied to a modules 'ModuleInfoZ' symbol.
  • Replacement for stdio family of functions to avoid deficiencies with MSVCRT.

MinGW Command line switches

A list of the available command line switches specific to MinGW GDC:

-v1Compile using D1.
-v2Compile using D2. (default)
-fno-dmainDo not link 'main' function from phobos.

MinGW Samples

Known Issues

  • 64-bit field-less structs will throw a null this exception when used with varargs.
  • TLS support is currently only available with the mingw-gdc patches.