Hi.
I’m not sure, whether this is the right forum for my question. I’m sorry
if not.
First of all I work on Windows 7 with a Ruby 1.9.3-p327 installation
from RubyInstaller.org.
I tried embedding the Ruby interpreter in a C++ program.
Code:
#include “ruby.h”
int main(){
ruby_init();
return 0;
}
But when I compile it, I get the error message “undefined reference to
‘ruby_init’”.
After a long time of searching I found a hint that it is a linking
error.
So I tried compiling with the option -lruby.
But then I get another error “cannot find -lruby”.
The only libraries I found are in lib\ruby\1.9.1\ of my installation,
but they don’t work. I also downloaded the source code of Ruby
1.9.3-p327, but there I can´t find the right files too.
I’m at a loss. Where can I find this library? Or do I need any other
files?
Felix