shared libs for OSX

Guillaume Piolat first.last at gmail.com
Mon Dec 27 10:52:22 UTC 2021


On Sunday, 26 December 2021 at 12:18:45 UTC, Peter wrote:
> Hi,
> This was implemented ?
> I am trying to load,call and unload multiple shared libs/dlls 
> which are written in dlang on Linux , macOS and windows.

Hello,

See the example here in:
https://github.com/AuburnSounds/Dplug/blob/master/examples/distort/dub.json#L13

Those are the flags you need to pass to D compiler to have shared 
libraries in Linux, macOS and windows, in a way that they can be 
copied to another system.
Within those libraries, it's easiest not to use the D runtime 
(https://github.com/AuburnSounds/Dplug/wiki/Working-in-a-@nogc-environment) and then you are in a restricted D subset. You _might_ be able to initialize the D runtime but it can be tricky.


More information about the Digitalmars-d mailing list