Prajkata
Prajkata

Reputation: 65

how to access functions written in c/c++ into ruby script?

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

Answers (4)

aurelian
aurelian

Reputation: 166

You could also try Rubyinline

Upvotes: 1

thomasfl
thomasfl

Reputation: 159

Ryan Davis has created a 'Hello, World!' C extension example for beginners:

https://github.com/zenspider/ruby-c-example

Upvotes: 1

undur_gongor
undur_gongor

Reputation: 15954

Other options are:

Upvotes: 1

Miguel Grinberg
Miguel Grinberg

Reputation: 67479

You can create a Ruby module that wraps your C/C++ functions using SWIG.

Upvotes: 0

Related Questions