The Abandon Wars

Sunday, February 18, 2007

I hate telkom! Now that I've got that off my chest I can get down to some real posting. I've been playing with different methods of embedding ruby in C++ (or vice versa) and managed to stumble across something obscure or awkward in almost every one.

Firstly I couldn't include ruby.h: It complained about having the wrong MSC version. This was easy enough to get around, simply delete the offending check (three lines of # defines). Next the compiler started bitching about an unknown struct fd_set (syntax error : identifier 'fd_set'). It took a little longer to resolve this one, turns out winsock.h must be included before ruby.h

Then I managed to get stdafx.h into the project which caused havoc and was finally solved by starting a new project without it :( ... Following this I tried various examples I found on the web, none of which worked out of the box - generally because of old header incompatibility.

Finally I've found a c++ wrapper for ruby that looks quite interesting. It's RubyNative from www.gaffer.org; only I don't how well it will work because it's still downloading... 240K and it's taken all afternoon to download! For pity sake this is supposed to be a 1MBit line - thank you so much Telkom!

I've also used SWIG very briefly and whilst it worked it seemed a bit ... untidy. Unless RubyNative does not work I'm going to avoid SWIG for the time being.

And that's that from Ruby world. I have done a bit more work on the image combiner. It could now be considered to be in late alpha (if I cared about releases). As can be seen I've added a few more options and wired up the previously existing ones.


Later!

3 Comments:

  • What do you know! RubyNative just worked (and with a very small amount of editing it worked without warnings). Wicked!

    By Blogger Andrew, at 6:28 pm  

  • So, this is some kind of texture atlas creation utility, right?

    By Blogger Justin Paver, at 7:37 pm  

  • Cool.. now if you could just find a way to make Telkom 'just work' that would be lovely :)

    By Blogger Flint, at 8:53 am  

Post a Comment

<< Home