Status D dynamic libs?

Frank Benoit keinfarbton at googlemail.com
Sat Apr 19 14:28:46 PDT 2008


e-t172 schrieb:
> On Windows, I don't know. On Linux, I have already compiled a D shared 
> library with no problems whatsoever. I'm using GDC, but if DMD supports 
> PIC you should be just fine.
> 
> Just remember not to include Phobos/Tango when creating your shared 
> library (it won't work, because Phobos/Tango is not compiled PIC). With 
> GDC you can avoid linking to Phobos/Tango using the -nophoboslib switch. 
> I don't know for DMD. Of course, you still have to link to Phobos/Tango 
> when building the actual application.
> 
> However, when maintaining shared libraries, automatic function inlining 
> might cause problems. See the "library standardization" thread for details.

Did you use the example code from the digitalmars windows example?
Can you post a minimized linux example?
Can "new MyClass" be called?
Have you tried with exceptions crossing the lib boundary? (bug #1693)

Not linking tango you mean just the tango-base-dmd.a, like supplying an 
empty dummy.a ?




More information about the Digitalmars-d mailing list