can't used dynamic shared libraries compiled with -defaultlib=libphobos2.so

Moritz Maxeiner via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 3 19:17:33 PDT 2017


On Monday, 3 July 2017 at 21:43:07 UTC, Timothee Cour wrote:
> How would I use a dynamic shared libraries compiled with 
> -defaultlib=libphobos2.so? Is that supported?
>
> I'm running into https://issues.dlang.org/show_bug.cgi?id=17591

Works for me using dmd v2.074.1 on 64bit Linux. What exactly are 
you using?
 From your stack trace, it looks to me like the D runtime 
initialization/termination calls are not in balance (more 
termination than initialization), so you may try to workaround 
that in your case by calling `Runtime.initialize()` from 
`core.runtime` explicitly after `dlopen()` (though you should put 
that behind a `version(BuggySharedLibs)`).


More information about the Digitalmars-d mailing list