Creating a dynamic library on Linux with DMD
Robert Fraser
fraserofthenight at gmail.com
Thu Jun 7 23:43:42 PDT 2007
Yes; it is. Use extern(C) and don't worry too much about the calling convention stuff (I got it working on Linux and Windows). If you need the JNI, you need to wrap the header (I used bcd.gen and did some manual editing after that). I'm working on a transparent Java-D interop layer, but it's on hold for a while; I'll probably get back to it this fall. I can send you what I have so far if that'd be helpful. So, basically, no, you don't need a C library, just compile the D library as a standard shared object.
All the best,
Fraser
Frank Benoit Wrote:
> I want to call D from Java.
> I think, I need a dynamic library (.so) which implements generated C stubs.
>
> The lib does only need to export those C function. The lib shall contain
> the needed runtime. (and i want to use tango)
>
> Is that possible?
More information about the Digitalmars-d
mailing list