September 01, 2005 How to use a D object file from C? | ||||
---|---|---|---|---|
| ||||
How do I access D functions and methods from a C program? |
September 01, 2005 Re: How to use a D object file from C? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Traveler Hauptman | "Traveler Hauptman" <Traveler_member@pathlink.com> wrote in message news:df6teq$i0c$1@digitaldaemon.com... > > How do I access D functions and methods from a C program? You declare functions as extern (C) and make a header file for your C code. You can't get access to methods since that would require the D object API to be available in C/C++ directly. I have a very alpha reflection API for C coders to find D classes, instantiate them and access methods and fields. It's available at http://home.comcast.net/~benhinkle/dflect/ ps- this thread might have been more appropriate for digitalmars.D.learn |
Copyright © 1999-2021 by the D Language Foundation