Wrapping C++ in a C Interface

Posted on Sat 22 January 2011 in tech • Tagged with c/c++

This is perhaps the simplest, slickest way to wrap C++ in a C interface I've ever seen, courtesy of Matthieu Brucher. The key concept is the forward declaration of the Manager type, which is valid for both C++ and C. Any C that attaches to this interface doesn't have to …

Continue reading