Dynamic Library Support for D

Adam D. Ruppe destructionator at gmail.com
Thu Jan 2 11:45:42 PST 2014


On Thursday, 2 January 2014 at 19:33:38 UTC, Dicebot wrote:
> [dicebot at fog ~]$ dmd -shared -fPIC -defaultlib=libphobos2.so

I believe it also works if you don't put a default lib on the .so 
at all iff loaded by D - it finds the symbols it needs in the 
main program.

But it is also a bit of a pain to use on Windows, mainly because 
you have to do your own DllMain. I think this should be 
automated, or at least in a mixin template for easy use. With a 
windows dll, I'm not sure if the gcs are shared but they work.


More information about the Digitalmars-d mailing list