Apache "mod_d" needs C to instantiate D interpreter?
Jacob Carlborg
doob at me.com
Tue Nov 9 01:45:15 PST 2010
On 2010-11-09 01:37, JFD wrote:
> Yes, you're right. One should implement Apache module in D.
>
> One thing is that Apache module entry point expects a "C" function. I've figure
> that that one could just add extern(C) in front of D function to be callable from
> C, so that was easy. Also, Apache expects .so shared library, and one could build
> it roughly like this:
>
> Let DMD build a .a library:
> dmd -fPIC -lib libhello.d
>
> Then convert it to shared library:
> gcc -shared -Wl,-soname,libhello.so.0 -o libhello.so.0.0 libhello.a
>
> Could DMD build .so shared library directly (did I miss something)?
>
> Then it's all D from there on. Cool!
>
> Thank you.
Dynamic libraries doesn't work currently with DMD on Linux. They do work
with DMD using Tango on Mac OS X where DMD also can build dynamic
libraries directly (with the -dylib flag).
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list