3 ms·
Note that C++ has "extern C" for the same purpose, and many people do not seem to be aware of it. You can perfectly write a C++ library and expose a C-safe sub
by tenfingers 11y ago
Note that C++ has "extern C" for the same purpose, and many people do not seem to be aware of it.
You can perfectly write a C++ library and expose a C-safe subset. I've done so many times.
The problem arises if you need to expose objects (with virtual methods), which C obviously doesn't have as the ffi is basically restricted to plain functions and record types.
- deleted 11y ago[deleted]
- tenfingers 11y agoYes sorry, typo (fixed).