Reputation: 65
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.
Upvotes: 2
Views: 174
Reputation: 159
Ryan Davis has created a 'Hello, World!' C extension example for beginners:
https://github.com/zenspider/ruby-c-example
Upvotes: 1
Reputation: 15954
Other options are:
Upvotes: 1
Reputation: 67479
You can create a Ruby module that wraps your C/C++ functions using SWIG.
Upvotes: 0