From: Jason Roelofs Date: 2009-12-18T01:40:06+09:00 Subject: Re: C++ pointers to Ruby objects --001636ed657c42b96e047aef4602 Content-Type: text/plain; charset=ISO-8859-1 You need to either build your own C wrapper around the C++ and expose that in Ruby as you cannot just map C++ objects to Ruby's C-API. Or you use a tool like Rice ( http://rice.rubyforge.org ) or SWIG to wrap the C++ into Ruby. I would also recommend looking into Rb++ ( http://rbplusplus.rubyforge.org ) which IMO (though slightly biased) is easier to deal with than SWIG. Jason On Thu, Dec 17, 2009 at 10:42 AM, Yuri Albuquerque wrote: > I'm trying to make an interface between PhysX and Ruby and I got stucked > on the very beggining. XD > > I have an NxPhysicsSDK pointer, pointing to an object (duh) and I would > like to store this pointer into an Ruby VALUE object. I don't really > need to see it's value outside the extension class (being clear: > everything would be encapsulated), but I only find conversions from C > pointers, not C++ objects. > > Does anyone have a tip? > -- > Posted via http://www.ruby-forum.com/. > > --001636ed657c42b96e047aef4602--