Differences between revisions 6 and 7
Revision 6 as of 2007-09-07 14:44:36
Size: 1728
Editor: ?ArthurLoiret
Revision 7 as of 2008-01-22 17:48:42
Size: 1934
Editor: MiriamRuiz
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
 * [http://wxd.sourceforge.net/ wxD]: wxWidgets bindings for the D programming language.
 * [http://dronten.googlepages.com/fltk4d fltk4d]: binding to the gui library FLTK for the D programming language.

Bindings for the D programming language

HOWTO: generate a D binding from a C library

Now, let's generate a binding for libalsaplayer (for example):

  • mkdir tmp; cd tmp
  • for i /usr/include/alsaplayer/*.h ; do echo $i && bcdgen $i alsaplayer -C -b ; done

bcdgen $1 $2 will generate a binding for $1 header file in a $2 module, so all alsaplayer D headers will have to be included from alsaplayer.*;

-C option tell bcdgen this is a C header, and -b avoid 'bcd.' prefix for modules name.

You'll find your binding in ./bcd/$2 :-)