On Tuesday, 26 March 2024 at 19:24:39 UTC, Chris Piker wrote:
Hi D
I have a C library I use for work, it's maintained by an
external organization that puts it through a very through test
framework. Though source code is supplied, the intended use is
to include the header files and link against pre-compiled code.
What is the best way, as of 2024 to use this library with D, in
particular dmd? ImportC doesn't seem like the go-to option
since the C source does not need to be complied. I've seen
some forum post indicating that manually generated D wrappers
are no longer needed, but I'm fuzzy on the particulars. If
there's any blog posts or other instructions you'd like to
reference I'd be happy to check them out.
For reference here's the C library in question:
https://naif.jpl.nasa.gov/naif/toolkit_C_PC_Linux_GCC_64bit.html
Thanks for any guidance you can provide,
Should be able to just use it, as described here:
https://forum.dlang.org/post/qxctappnigkwvaqak...@forum.dlang.org
Create a .c file that includes the header files and then call the
functions you need.