D has better way to bind to C++ than to D.

Paul Backus snarwin at gmail.com
Wed Feb 22 20:22:18 UTC 2023


On Wednesday, 22 February 2023 at 19:26:40 UTC, Hipreme wrote:
> Given the following situation: I want to use an externally 
> defined D symbol in my current library without adding it as a 
> dependency.
>
>
> - I don't want to use an import path to bind to a symbol in D 
> because this would complicate even more my build system, we 
> already do it from C by doing: `extern(C) void something();`

I think the real question here is, why don't you want to do this 
using `import`? What's the actual root cause of this 
"complication" you refer to? Better to address that problem 
directly than to add a new language feature as a workaround.


More information about the Digitalmars-d mailing list