Ruby Extensions

R

Ritesh Tijoriwala

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.
 
T

Timothy Goddard

Ritesh said:
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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,209
Messages
2,571,088
Members
47,687
Latest member
IngridXxj

Latest Threads

Top