From: Mike Piazza Date: 2009-04-02T05:01:12+09:00 Subject: Re: Ruby Embedding Phlip wrote: > Mike Piazza wrote: > >> I downloaded the ruby 1.9.1 for windows and i'm trying to embed using >> C++ for 3 days and, i don't know but for some reason i'm getting crashes >> with these functions: >> >> .. >> rb_load_file > > Post a sample of your code, and the "crash" particulars. And what C++ > are you using? I'm using MSVC 2008 Express The code: extern "C" { #include } #include #include RUBY_GLOBAL_SETUP int main(int argc, char **argv) { RUBY_INIT_STACK ruby_init(); ruby_init_loadpath(); ruby_script("embedded"); void *file = rb_load_file("test.rb"); ruby_run_node(file); return 1; } -- Posted via http://www.ruby-forum.com/.