www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - can't used dynamic shared libraries compiled with

reply Timothee Cour via Digitalmars-d <digitalmars-d puremagic.com> writes:
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
Jul 03
parent Moritz Maxeiner <moritz ucworks.org> writes:
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)`).
Jul 03