I have a ruby script. I need to access the functions written in c/c++ in my ruby script. Can any one tell me how to access these functions. Thanks in advance.
4 Answers
Ryan Davis has created a 'Hello, World!' C extension example for beginners:
Comments
You can create a Ruby module that wraps your C/C++ functions using SWIG.
2 Comments
Prajkata
Miguel thanks for support, is there any way without the use of software like SWING.
Miguel Grinberg
SWIG is the cleanest solution, but you have a number of other options. You could make an executable from your C functions, then invoke the executable from Ruby via a
system() call, for example.