Passing C++ objects to embedded Ruby with SWIG

Posted by Nat Tuck Mon, 21 Jul 2008 19:12:00 GMT

SWIG does an excellent job wrapping C++ classes for use as a Ruby extension module. Unfortunately, it doesn’t look to be designed to handle some of the issues that I’ve run into when embedding Ruby to extend a C++ application. Specifically, how to pass C++ objects to Ruby calls in such a way that they can be passed back to SWIG generated methods requires a bit of hackery.

Read more...

Tags , ,