Z
Zach Dennis
I'm trying a very simple example of embedding Ruby in C and I can't get it
to work, nor can i find any documentation on how to get it to work. Here's
what I've got:
#include <ruby.h>
int main(int argc, char *argv[]) {
ruby_init();
rb_eval_string("puts 'hello world'");
ruby_finalize();
return 0;
}
Here is what i get:
Compiling...
out.c
Linking...
out.obj : error LNK2001: unresolved external symbol _ruby_init
out.obj : error LNK2001: unresolved external symbol _ruby_finalize
out.obj : error LNK2001: unresolved external symbol _rb_eval_string
Debug/out.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
out.exe - 4 error(s), 0 warning(s)
Any ideas? Thanks,
Zach
to work, nor can i find any documentation on how to get it to work. Here's
what I've got:
#include <ruby.h>
int main(int argc, char *argv[]) {
ruby_init();
rb_eval_string("puts 'hello world'");
ruby_finalize();
return 0;
}
Here is what i get:
Compiling...
out.c
Linking...
out.obj : error LNK2001: unresolved external symbol _ruby_init
out.obj : error LNK2001: unresolved external symbol _ruby_finalize
out.obj : error LNK2001: unresolved external symbol _rb_eval_string
Debug/out.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
out.exe - 4 error(s), 0 warning(s)
Any ideas? Thanks,
Zach