Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Making Things More Robust

(Back to Tutorials)

Or: Crash-proofing Your DDL Host Program

In this tutorial you will see examples on how to:

  • Add libraries to the linker's registry
  • Handle linkage exceptions

Background

In the previous tutorial we loaded the host program's map file ("basic.map") via the linker like so:

linker.loadAndRegister("basic.map");

What this does is tell the linker to load "basic.map", and register it for later use. That "later use" is in fact any time the linker is asked to link a new library, as we did with "plugin.obj":

linker.loadAndLink("plugin.obj");

TODO