Note that C++ has &quot;extern C&quot; for the same purpose, and many people do not seem to be aware of it.<p>You can perfectly write a C++ library and expose a C-safe subset. I&#x27;ve done so many times.<p>The problem arises if you need to expose objects (with virtual methods), which C obviously doesn&#x27;t have as the ffi is basically restricted to plain functions and record types.