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" ],