shared libs for OSX

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Fri May 22 09:10:27 PDT 2015


On Thursday, 21 May 2015 at 01:31:37 UTC, bitwise wrote:
> I've been reading over all the bugs and conversations I can 
> find, but I'm still confused about exactly what's going on here.
>
> What I need:
> -load a dynamic library on OSX using dlopen or 
> Runtime.loadLibrary
> -use dlsym to retrieve my functions and set up a gc proxy

Forget about the GC proxy, it's a hack to work around ODR issues.
What you really need is a shared phobos library as we have on 
linux or freebsd.

> -pull interfaces of classes defined in the dynamic library into 
> my program for use.

If you want to exchange data and code across multiple shared 
libraries and your executable the runtime must be fully aware of 
all shared libraries to support casting ,exceptions and 
finalizers.


More information about the Digitalmars-d mailing list