Calling D function from C

Bill Baxter dnewsgroup at billbaxter.com
Wed Apr 23 03:26:12 PDT 2008


Jonathan Crapuchettes wrote:
> Is there a way to compile a D object file with some C code? I am looking 
> into creating a PHP extension from D instead of C and as I see it, I 
> would need to be able to create and interface function in C that can 
> call a D function.

You might be able to learn something from looking at PyD.
http://pyd.dsource.org/
That aims to let you write Python extensions in D.

It works by making shared libs though.  That might be the best way.  I 
think that means you would have to use GDC on linux.

--bb



More information about the Digitalmars-d mailing list