I want to make a C++ extension (that uses external libraries, namely stdlib and OpenCV) for Ruby, then bring that into a Rails project. Is there anything special I should do to make it compatible for Rails, or better yet, is there a Rails framework that makes writing extensions (especially for C++) easier?
Share
Regardless of Rails you can create gems with C extensions.
I suggest you watch the RailsCast on how to create a gem:
http://railscasts.com/episodes/245-new-gem-with-bundler
And from there check the RubyGems tutorial on how to add C extensions
http://guides.rubygems.org/c-extensions/
I’ve never done a C++ extension, but EventMachine is built with C++
https://github.com/eventmachine/eventmachine