From: Jason Roelofs Date: 2008-12-12T00:13:20+09:00 Subject: Re: Q: FFI and C++? Because of the complexity that C++ adds, I doubt that any feasible FFI library can be made that works reliably against C++ libraries, though Charles will probably be a better voice for whether this is truely possible or not. For now, there are a few libraries now out that will definitely help you out (and are IMO a ton better than trying to deal with SWIG, but I'm slightly biased). They are: Rice - A C++ development library that abstracts out the internals of Ruby's object model to make wrapping C++ libraries as easy as possible. http://rice.rubyforge.org/ http://github.com/cout/rice Rb++ - Using GCCXML and Rice to auto-generate wrappers of the C++ code you are wanting to wrap http://rbplusplus.rubyforge.org http://github.com/jameskilton/rbplusplus Jason On Thu, Dec 11, 2008 at 10:03 AM, Jeremy Henty wrote: > If I want to wrap a C++ library using FFI, can it cope with the name > mangling? I've got a working example where I compile a C wrapper for > the C++ and call the wrapper from FFI. That's rather clunky, I'd hope > there is a cleaner way. If it does come to writing a wrapper, are > there any packages for auto-generating the wrapper code? (Maybe SWIG > can do something?) > > Regards, > > Jeremy Henty > >