Proof of concept: automatically import C header files
Jacob Carlborg
doob at me.com
Tue Jul 16 07:15:55 PDT 2013
Made a proof of concept to automatically parse, translate and import C
header files in D using DStep. DMD is linked against DStep and does not
start new process to make the translation.
I added a new pragma, include, that handles everything. Use like this:
// foo.h
void foo ();
// main.d
module main;
pragma(include, "foo.h");
void main ()
{
foo();
}
DMD: https://github.com/jacob-carlborg/dmd/tree/dstep
DStep: https://github.com/jacob-carlborg/dstep/tree/c_api
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list