How to include c++ bindings in a rails project

三世轮回 提交于 2019-12-11 14:57:53

问题


I asked this question about r-trees and the answer included using a c++ library with some ruby wrappers. I've gotten the wrapper to work in a test file, but how can I include the wrapper in my rails project?


回答1:


I included the folder containing the files (RTREE in this case) in the /lib folder of my project. I then ran ruby exconf.rb from within that folder. Lastly, I included the necessary file in my project (require RBOOST/rboost_rtree_2d_rect). With that, I was good to go.



来源:https://stackoverflow.com/questions/20101444/how-to-include-c-bindings-in-a-rails-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!