Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact
Version 35 (modified by KirkMcDonald, 17 years ago)
-version=Tango shouldn't be considered optional.

Known Issues

Known problems with the DM toolchain

Automated Windows Installer

There is an automated installer for the Win32 platform. It works with DMD+Tango on win32 systems ( not tested on Vista ). Use this as an alternative to proceeding with manual installation.

Windows Installer for DMD Tango

Tango Installation on Windows

Note: These installation instructions assume a default DMD installation and that the archive has been extracted into C:\, creating C:\dmd as the home of the DMD compiler. The basic goal of this process is to replace Phobos with Tango by placing the Tango object.d and root directories at the head of the DMD include path, and replacing the Phobos libphobos.a with its Tango equivalent of the same name.

Step By Step..

  1. Extract the Tango archive into a new directory named C:\dmd\import\tango. The tango archive can be found at http://www.dsource.org/projects/tango/browser/trunk , use the link at the bottom of the page to get the Zip archive.
  1. Open C:\dmd\bin\sc.ini in a text editor. The contents should look like this:
    [Environment]
    LIB="%@P%\..\lib";\dm\lib
    DFLAGS="-I%@P%\..\src\phobos"
    LINKCMD=%@P%\..\..\dm\bin\link.exe
    

As all .ini files in Windows, any line beginning with a semicolon ';' will be considered a comment and will therefore be ignored by DMD. To ensure removal of Tango is as painless as possible, it is a good idea to leave the original lines in the file as comments with the edited line below.

Now, on to the editing:

2.1. Add C:\dmd\import\tango\lib to the LIB path before any other entries. This will ensure that the Tango replacement libraries will be linked instead of the default DMD libraries. Assuming Tango is installed within the DMD directory (as per these instructions) a relative path name may be used to refer to this location. If not, an absolute path name must be used instead. Both versions follow:

Relative: "%@P%\..\import\tango\lib"
Absolute: "C:\dmd\import\tango\lib"

e.g. LIB="%@P%\..\import\tango\lib;%@P%\..\lib;%@P%\..\..\dm\lib"

2.2. Replace the reference to the Phobos include directory in the DFLAGS line with a reference to the Tango root directory. This will ensure that the Tango import modules will be used in place of those in Phobos, and replacing the reference reduces the risk of hard to diagnose compile errors. As in the LIB changes above, either a relative or absolute path may be used, as appropriate:

Relative: "%@P%\..\import\tango"
Absolute: "C:\dmd\import\tango"

e.g. DFLAGS="-I%@P%\..\import\tango"

2.3. Append "-version=Tango" to the DFLAGS line modified above. This version flag is quite useful for determining whether Tango is the current default library:

e.g. DFLAGS="-I%@P%\..\import\tango" -version=Tango

After making these changes, sc.ini should look like this:

[Environment]
; LIB="%@P%\..\lib";\dm\lib
LIB="%@P%\..\import\tango\lib;%@P%\..\lib;%@P%\..\..\dm\lib"
; DFLAGS="-I%@P%\..\src\phobos"
DFLAGS="-I%@P%\..\import\tango" -version=Tango
LINKCMD=%@P%\..\..\dm\bin\link.exe
  1. If the Tango package is a source package and does not contain a phobos.lib in the lib folder, build it by running build-dmd.bat in this folder. This requires the Digital Mars make utility located in /dm/bin to be the first 'make' executable encountered in the search path.
  1. Compile and run "install\hello.d" located from the Tango root directory. While Tango typically requires the use of Build for compilation, this file may be compiled manually as well. If the file compiles cleanly and prints "Hello, Tango!" then installation has been successful. Congratulations!