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

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 -version=Posix
  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.

NOTE 1: With DMD 1.013, the compiler started to handle library arguments to the linker properly, if they're put in dmd.conf. (With earlier DMD versions you will need to add <DMD install prefix>/lib/libtango.a to your DFLAGS line in dmd.conf.)

NOTE 2: The installers accompanying Tango 0.97 installed imports to import/<DMD version> instead of include/d . Later installers tries to clean up this when detected during uninstall. Only shipped DMD versions are checked though, so there may be stale files if the previous above instructions have been used for other versions of DMD.