Status of Dynamically Loadable D Libraries

Nick Ulle nim.junk at gmail.com
Sun Feb 10 15:49:44 PST 2013


On Sunday, 10 February 2013 at 23:41:54 UTC, John Colvin wrote:
> For shared libraries (linux) I'd use ldc . It's just works.

Not quite. Using
   ldc2 -shared -relocation-model=pic mylib.d
Compiles and links, but on loading there are undefined symbols 
(_Dmain). Including a main() function gets me a loadable library, 
but much like the case with dmd, it segfaults if I call writeln.


More information about the Digitalmars-d mailing list