Is it possible to suppress standard lib and dlang symbols in dylib (macos)

David dangermouseb at forwarding.cc
Sun Mar 14 11:33:00 UTC 2021


On Sunday, 14 March 2021 at 00:00:59 UTC, Adam D. Ruppe wrote:
> On Saturday, 13 March 2021 at 23:41:28 UTC, David wrote:
>> So Excel complains that it can't load my library - presumably 
>> because libphobos2 and libdruntime are not in the sandbox.ly
>
> You *might* be able to compile with 
> --link-defaultlib-shared=false to use the static 
> phobos+druntime... but with shared libs it prefers shared and 
> might not allow this. Probably worth a try.
>
> Otherwise I'd try to just add the phobos so to your sandbox 
> somehow. or the rpath set to current directory and putting them 
> in your correct directory may also work. I don't know how that 
> works on Mac but on Linux it is passing... `-L-rpath -L.` or 
> something like that when compiling... I can't find my notes on 
> this but something like that.

I think figuring out how to add phobos to the sandbox is probably 
the best option as I'm sure it won't be the last dylib I need to 
load.

Anyone else done this? Pointers welcome.


More information about the Digitalmars-d-learn mailing list