Is it possible to suppress standard lib and dlang symbols in dylib (macos)
Guillaume Piolat
first.name at spam.org
Fri Mar 12 00:12:37 UTC 2021
On Thursday, 11 March 2021 at 08:34:48 UTC, David wrote:
> I thought it would be fun to convert some old C++/C quant utils
> to D. I'm starting with a simple library that I call from vba
> in Excel on macos:
>
>
> module xlutils;
>
> import core.stdc.string : strlen, strcpy;
> //import std.conv : to;
> //import std.string : toStringz;
> import core.stdc.stdlib : malloc, free;
>
> extern (C) double addDD_D(double a, double b) {return a + b;}
> ...
>
>
>
> Is there a way of not exposing the symbols that aren't mine? -
> I only need a simple C interface.
>
> Thx
>
> David
Create a exports.lst file with:
_addDD_D
as the only line there.
Build with:
"lflags-osx-ldc": [ "-exported_symbols_list", "exports.lst",
"-dead_strip" ],
More information about the Digitalmars-d-learn
mailing list