Ruby Extensions

Hello All,
I need to wrap/extend my C++ header file to be able to use it from Ruby.
The header file depends on other header files as well. But the only
functionality I desire to use in from Ruby is from the original header
file. Is it necessary to wrap all include header files as well or just
wrapping the main header file will do the trick…

Thanks,
Ritesh.

Ritesh T. wrote:


Posted via http://www.ruby-forum.com/.

You could use SWIG to wrap just this header file. Only the classes and
functions you want to access need be provided to make the binding. See
the SWIG documentation for details.

Alternatively, you can create a C interface (no C++) and use Ruby/DL to
use the library without a binding.