From: Geoffrey H. <ge...@ge...> - 2006-10-11 14:51:45
|
On Oct 10, 2006, at 2:16 AM, richard apodaca wrote: > I'm trying to get Ruby scripting to work with Open > Babel-2.0.2 and SWIG on Linux. What version of SWIG are you using? I'm glad to see the progress you've made, but certainly previous versions of the Perl and Python wrappers uncovered various bugs with SWIG itself. > With a little tweaking (I needed to add #include > <math.h> at the top of the .cxx file), I was able to > compile openbabel_wrap.cxx against my installed > OB-2.0.2 library using make. Good to know. It should be possible to inject this into the SWIG output. > In the case of OBAtom, the offending code is at the > very start of the class stanza: > > cOBAtom.klass = rb_define_class_under(mRob, "OBAtom", > ((swig_class *) > SWIGTYPE_p_OpenBabel__OBNodeBase->clientdata)->klass); Since the Ruby support in SWIG is relatively new and continually improving, I'd suggest grabbing the latest SWIG from CVS and giving that a spin first: http://www.swig.org/cvs.html If that doesn't work, let's submit this as a SWIG bug and see what happens. It's often hard for me to follow the SWIG auto-generated code. As far as getting autoconf building working, I'll see if I can't get that working soon. It turns out that I was missing some packages. Cheers, -Geoff |