DDL 1.2 Beta

pragma ericanderton at yahoo.com
Mon Sep 4 18:56:00 PDT 2006


All,

   After much work, DDL 1.2 Beta is ready for public consumption.  The 
library interface is complete, the OMF loader works well, and the 
runtime linker performs as designed.  As such, I've labeled this as RC1 
for the project.

http://www.dsource.org/projects/ddl
http://www.dsource.org/projects/ddl/wiki/Downloads
http://www.dsource.org/projects/ddl/wiki/Tutorial/Installation

This beta release features OMF object support that is stable and works 
very well with the Win32 version of DMD.  Linux support, completed 
documentation and tutorials are all still pending completion in the next 
few months.

Special thanks to the project contributors who made getting this far a 
reality.

http://www.dsource.org/projects/ddl/wiki/Contributors

As always, the project is open to critique, criticism and contributions. 
  Feel free to post here, on the project forum or even in the project 
wiki.  My mailbox is also open for all of the above.

http://www.dsource.org/projects/ddl/wiki/Community

- Pragma

---------------
So what is DDL?
---------------

DDL stands for "D Dynamic Libraries" and as the name implies, provides 
dynamic library loading for the D Language. It can be used as a plugin 
architecture, a replacment for DLL files, an interface for dynamic 
reflection, or as a means for working with intermediate files.

More information in the project FAQ:

http://www.dsource.org/projects/ddl/wiki/FAQ

----------
An Example
----------

(A better formatted example can be found here: 
http://www.dsource.org/projects/ddl/wiki/Tutorial/UsingDDL/Quick)

/////////////////
// plugin.d
module plugin;

char[] helloWorld(){
     return "hello world";
}
/////////////////

/////////////////
// example.d
import ddl.DefaultRegistry;
import ddl.Linker;

import mango.io.Stdout;

void main(){
     auto linker = new Linker(new DefaultRegistry());
     linker.loadAndRegister("example.map");

     auto plugin = linker.loadAndLink("plugin.obj");

     auto helloWorld = plugin.getDExport!(char[] 
function(),"plugin.helloWorld")();

     Stdout.put(helloWorld());
     Stdout.put(CR);
}
/////////////////



More information about the Digitalmars-d-announce mailing list