Note: This website is archived. For up-to-date information about D projects and development, please visit
Version 30 (modified by aldacron, 11 years ago)

Welcome to Derelict

Derelict is a collection of D bindings to C shared (dynamic) libraries which are useful for multimedia applications, with a heavy bias toward game development-related libraries.


Derelict supports some useful features for project development, including:

  • Cross-Platform Consistency - No matter which platform you release on, Derelict loads shared libraries manually at runtime and throws an exception when the library, or any symbol in the library, fails to load. This gives you complete control over how to handle the case of a missing shared library. You can fall back to a different code path, give your users a helpful error message, or take any action you want. Regardless, you have consistent behavior across multiple platforms.
  • Selective Symbol Loading - This feature allows you to override exceptions thrown by Derelict when a shared library symbol fails to load. It is a goal of the project that each Derelict package be updated from time-to-time to load the latest version of each library. Often, new library versions include new functions. If a user has an older version of the library installed, one that is missing the new function symbols, Derelict will notice and throw an exception. By making use of Selective Symbol Loading, you can override this behavior and allow the older library version to load successfully.

Getting Started

To start using Derelict, you will need the latest Derelict source and either Derek Parnell's Bud or Gregor Richards' Rebuild. If you are using Derelict with Tango, Bud will likely have problems, so you should prefer Rebuild for such applications.

Building Derelict

For the large majority of applications, you do not need to build the Derelict libraries. The build script included with Derelict is a convenience and not a requirement. Both Bud and Rebuild can compile your applications without the need to link with any Derelict libraries. As long as the Derelict modules are on your import path, both Bud and Rebuild will automatically compile those modules that you require and will link the resulting object files into your final executable. This is the recommended way to use Derelict. If you are a Tango user, it is currently the only way.

For those who insist on using the build script, it currently will not execute in a Tango environment. DMD fails to run Tango-enabled modules with the -run command line switch. Also, the build script is configured to use Bud so you must have it installed on your system path. In the future, the script may include support for Rebuild so that it can be compiled into an executable and used with Tango, but it is not a priority.

To build in debug mode:

cd Derelict
dmd -run buildme.d debug

To build in Release mode:

cd Derelict
dmd -run buildme.d

Obtaining and Learning Derelict

Download Derelict: here

Alternate Download: Get Derelict via DSSS

Derelict Forums: here

Documentation: here

Tutorials: DMedia has a few tutorials on using DerelictSDL and DerelictGL.

Libraries Supported By Derelict

Here is a list of the libraries for which Derelict currently provides bindings:

  • Open Dynamics Engine (ODE)
  • OpenAL
  • OpenGL
  • OpenGL Utility Library (GLU)
  • DevIL, ILU, and ILUT
  • SDL
  • SDL_image
  • SDL_mixer
  • SDL_net
  • SDL_ttf
  • FreeType
  • libogg
  • libvorbis

Although not official Derelict packages, members of the community have produced the following bindings (these packages may or may not be compilable with the latest DMD or GDC):

Need More Help?

See the Derelict documentation for specific details on a particular package. If you are having problems installing or using Derelict, please visit the forums.

Projects that use Derelict