Calling Ruby script from code

Started by
2 comments, last by choffstein 15 years, 5 months ago
Hello everyone! As you probably guessed from the title, what I'm trying to do is calling an external script from my c++ application. I know Lua or other scripts are more suited for this, but I'm just experimenting, so bear with me :) I've been searching the net for two days now, and all I found are functions like ruby_init(), ruby_options() and so on, but not a decent description of how they should be used. Moreover, I'd like to get some value back (the result of a sum, as an example), but ruby_script() has no return value. Do you know of any site or doc with some decent specs? Do I have to use an intermidiate library like SWIG?
[ King_DuckZ out-- ]
Advertisement
Extending Ruby
Ruby Embedded into C++
RICE -- Ruby Interface for C++ Extensions
I already ran into one of those, but I'll give a look at the others. The one referring to rubycentral seems promising :)
Thanks a lot!
[ King_DuckZ out-- ]
No problem. RubyCentral's "Programming Ruby" book is quite good for general Ruby information.

This topic is closed to new replies.

Advertisement