Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Installation Guide for Tango used with DMD on Mac OS X

This page details ways of installing Tango for DMD on Mac OS X.

Install Binary Bundle

  1. Download Tango, the .tar.gz option will suffice
  2. Extract the package
  3. If your download is with DMD and you want to install it, back up any previously installed dmd.conf
  4. If you have Phobos installed, and want to install Tango in the same place, back up object.d
  5. Copy the folders import and lib from the extracted folder, and bin for the compiler toolchain, to where you want to install
    • If you have admin access to your box, installing to /usr/local is recommended
  6. Make sure your <install path>/bin is part of your PATH and you should be ready to go.

Manual Build and Install

  1. Download or check out Tango sources.
  2. Enter the Tango directory where the build files are:
    $ cd <tango base>/lib
  • At this point you can run with various arguments to automate all of the following steps, to see the instructions do
    $ ./ --help
  1. Run to build the core Tango library.
    $ ./
  1. Install .a (library) files
    $ cp -Rf <tango base>/lib/libtango-base-dmd.a <DMD install prefix>/lib
  1. Install object.di
    $ cp -f <tango base>/object.di <DMD install prefix>/include/d
  1. Make .d source files accessible by copying the .d source into this path like so:
    $ cp -Rf <tango base>/tango <DMD install prefix>/include/d
    $ cp -Rf <tango base>/std <DMD install prefix>/include/d
  1. Update your dmd.conf (either alongside your DMD binary, or in /etc)
    DFLAGS=-I<DMD install prefix>/include/d -defaultlib=tango-base-dmd -debuglib=tango-base-dmd -version=Tango
  1. You can now build libtango-user-dmd.a, the library with Tango's user API.
    ./ dmd
  1. From within <tango-distribution-dir>/lib , install libtango-user-dmd.a to <DMD install prefix>/lib
    $ cp -f libtango-user-dmd.a <DMD install prefix>/lib

Add -L-ltango-user-dmd -L-L<DMD install prefix>/lib to your DFLAGS line in dmd.conf. The library path may be omitted if the library is installed to a directory that the linker already checks, for instance /usr/lib.

Without libtango-user-dmd.a, a buildtool like rebuild or build will be required.