On Saturday, 11 May 2024 at 20:04:38 UTC, Lance Bachmeier wrote:
On Saturday, 11 May 2024 at 19:33:03 UTC, solidstate1991 wrote:
I know that BindBC exists and otherwise would use it, but the
bigger the library, the more extra hurdle it'll have. When I
did a few bindings with it, I had to order the functions the
right way, so I could do things much quicker with the
Ctrl+Alt+Shift trick under VSCode, and even then having to
write both a statically linked and dynamically linked version
(the latter which required the functions to be loaded
individually into function pointers).
Maybe I should write some automation tool...
You might find this package useful
https://code.dlang.org/packages/dynamic
Also relevant if they're C functions:
https://forum.dlang.org/post/qxctappnigkwvaqak...@forum.dlang.org
And this if you want to convert C headers to D code:
https://forum.dlang.org/post/ugvc3o$5t3$1...@digitalmars.com