开发者

Embedding ruby in c++, problem with ruby libraries

I want to have a ruby interpreter in my c++ application. I found an article about it: http://aeditor.rubyforge.org/ruby_cplusplus/index.html But here they use a makefile to compile the program, and I'm not really familiar with this consequently I can't modify it properly. I also found a really simple example here: http://my.opera.com/subjam/blog/embedding-ruby-in-c-programs But again I encounter a compilation problem. They say you need to type g++ -o ruby_test1 ruby_test1.c -I/usr/lib/ruby/1.8/i486-linux/ -lruby1.8 And this makes sense to me, but I don't have the "i486-linux" folder in my ruby directory. I installed it via apt-get and I chose the '-dev' version.

Where can I find the needed file?

PS I'm using Ubuntu. If I like this interpreter I'll also want to make it work on Windows, so any help will, be appreciated.

I'm not interested in some subst开发者_Go百科itutes for ruby, like tinyrb or whatever.

Bye


You probably don't have an i486 architecture. like for me it's "x86_64-linux" run the arch command to see what architecture you have and then put that infront of "-linux" and see if it that is there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜