From: Glenn Lewis Date: 2004-01-01T09:47:41+09:00 Subject: Embedding Ruby as a plugin (e.g. PhotoShop) I'm trying to embed Ruby as a plugin to a program called Animation:Master (http://www.hash.com/). Everything compiles and links without errors, and my plugin loads into A:M, and my file requestor pops up for selecting which script I wish to run through the Ruby interpreter. After this, though, I can't seem to get Ruby to run. If I try this: int myargc = 2; char* myargv[] = { "ruby", "c:/src/hi.rb", 0 }; ruby_init(); ruby_options(myargc, myargv); ruby_run(); // - crash the entire application crashes on the call to ruby_run. If, however, I try this: ruby_init(); ruby_script("embedded"); rb_load_file("c:/src/hi.rb"); ruby_run(); // - hangs the entire application just hangs... I have to kill it myself. Just to test out my sanity, I built a separate executable with the above 2 snipits, and each of them worked fine as a stand-alone program. I've tried linking to C:\ruby\lib\msvcrt-ruby18.lib as well as C:\ruby\lib\msvcrt-ruby18-static.lib and they behave the same. Can anyone think of what I might be doing wrong? My e-mail address is: glenn at hometot periodcom Thanks! -- Glenn Lewis P.S. Notice how Paint Shop Pro has a python plugin for it? It would be cool if someone wrote a Ruby plugin for it. Thanks.