Use this if there's no system specific installation guide for your system.
System specific installation
If you need to install GDC on Windows, here is a guide to install GDC with MinGW.
For 64-bit MinGW see here.
If that does not work for you on Windows, take a look at this guide for using GDC on Windows.
An initial Android port is available, but development is paused for now and the code is in early alpha (read useless) state. See here for more information.
Guides for some Raspberry Pi linux distributions are located here
The following instructions have been tested on 64-bit Debian (unstable) with the gdc-4.7 branch of GDC (git).
Due to Debian's (and by extension, Ubuntu's) multi-arch directory structure, the pristine GCC sources will most likely fail to build because the scripts can't find certain files in the expected locations. While it is possible to patch the GCC sources by hand, this is error-prone and requires the know-how beforehand. A better solution is to use Debian's own patched sources:
# sudo apt-get build-dep gcc-4.7 # this installs development packages required by the build # pushd . && cd /usr/src && sudo apt-get source gcc-4.7 && popd # this installs the GCC tarballs in /usr/src/gcc-4.7-4.7.3 # cd /usr/src/gcc-4.7-4.7.3 # sudo vi debian/rules.patch # search for the line reads "debian_patches += gcc-d-lang", and comment it out # sudo debian/rules clean # sudo debian/rules patch # this unpacks the GCC tarballs in src/ and applies the Debian patches needed to make multiarch work # ... # download GDC sources here # cd /path/to/gdc/sources and make sure you are on the gdc-4.7 branch if cloned git repository # sudo ./setup-gcc.sh /usr/src/gcc-4.7-4.7.3/src # cd .. # mkdir objdir # cd objdir # /usr/src/gcc-4.7-4.7.3/src/configure --enable-languages=d --disable-multilib --disable-bootstrap --prefix=/usr ... # configure at will, multilib should be disabled as that breaks for some reason # make -j # and wait # sudo make install
See Cross Compiler.
After the installation
You might want to run the test suite, see Test suite