On Wednesday, 20 May 2015 at 21:35:38 UTC, bitwise wrote:
On Wednesday, 20 May 2015 at 18:53:30 UTC, Jacob Carlborg wrote:
On 2015-05-20 16:44, bitwise wrote:
I tried using a shared library for OSX yesterday. I opened it with dlopen, retrieved my extern(C) function, and called it. All was well,
and it seemed to work(wrote to the console with writeln).

But, I got a message in the console saying shared libraries were not yet
implemented for OSX. What exactly is it that's not working?

TLS, module constructors, module/class info, perhaps the GC, similar things.

Heh.. That's pretty useless. Any idea on the state of things? Like if there are plans to support this in the near future(few months)? I couldn't find many conversations on this. This kinda-totally ruins my plans(on OSX at least).

Actually, TLS works on OS X: dmd emulates it, while ldc has native TLS using undocumented OS X APIs. I'm unsure of how full-fledged the support is on those other issues, but I believe the big issue is that loading multiple shared libraries is not supported, as that will take more work:

https://github.com/D-Programming-Language/druntime/blob/master/src/rt/sections_osx.d#L198

If you want to talk to someone about getting more of shared libraries working, I believe Martin is your man.

Reply via email to