Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Build Instructions using Tango trunk on Linux/OSX/FreeBSD/Solaris

After LDC has been build, we can now set up a working LDC/Tango setup.

  • Install LDC to /opt/ldc
mkdir /opt/ldc
mkdir /opt/ldc/bin
mkdir /opt/ldc/import
mkdir /opt/ldc/lib
cd ../ldc/bin
cp ldc ldmd ldc.conf /opt/ldc/bin
  • Fetch&Compile Tango
export PATH=/opt/ldc/bin:$PATH
svn co
cd trunk
./build/script/bob.rb -vu -r ldc -c ldc .
cp libtango.a /opt/ldc/lib
cp -r object.di tango /opt/ldc/import/
  • Change the contents of /opt/ldc/bin/ldc.conf to:
    switches = [
  • Done! :D


  • "object.d: Error: module object cannot read file 'object.d'"; This error indicates that your ldc.conf is wrong; you may have a stale ldc.conf around that is used by ldc instead.
    To check for other ldc.conf files on your system you can do "find / -iname "ldc.conf"". Or put a syntax error into ldc.conf; if ldc isn't complaining, it's using a different ldc.conf file.
  • Instead of the bob.rb (a Ruby script) you can also use ./build/bin/<arch>/bob.
  • You can install ldc in some other directory, of course, but you need to adjust some paths!


  • Create a file called main.d:
    void main()
       Stdout("Hello World!").nl;
  • Compile it to verify that LDC with Tango is working:
    ldc main.d
Copyright © 2008, LDC Development Team.