2 ms·
> create a proper C binding to the C++ interface That's the generally recommended way of exposing your C++ library to any kind of non-C++ code. I'm not aware
by TillE 3y ago
> create a proper C binding to the C++ interface
That's the generally recommended way of exposing your C++ library to any kind of non-C++ code.
I'm not aware of any software which directly helps with that, unfortunately. You either do it manually or write a custom script. Here's a recent example of the latter, from Dear ImGui:
https://github.com/dearimgui/dear_bindings https://github.com/dearimgui/dear_bindings
- compiler-guy 3y agoBoth pybind11 and CLIF help with this and do it very well.
- fsloth 3y ago“I'm not aware of any software which directly helps with that, unfortunately.” If the API surface is not too large that’s one of the things ChatGPT is usually competent enough to ‘type out’ for you most of the way (delta some errors).