Problems with "require" when embedding Ruby

R

Rurouni

I have Ruby interpreter embedded in engine... so far all was good. But
when I tried to require custom extension compiled in .dll(some C++
exported using SWIG) I encountered an error... As far as I know require
simple is searching for .dll or .so with same name... Maybe SWIG
generates bad dll , but standart non embedded Ruby runs this require
very well....
Do you have any advices? Any help will be thanksfull.
 
K

Kouhei Sutou

Hi,

In <[email protected]>
"Problems with "require" when embedding Ruby" on Tue, 7 Mar 2006 00:59:24 +0900,
Rurouni said:
I have Ruby interpreter embedded in engine... so far all was good. But
when I tried to require custom extension compiled in .dll(some C++
exported using SWIG) I encountered an error...

Are you using rb_require()? If so, try the following:

rb_funcall(Qnil, rb_intern("require"), 1, rb_str_new2("YOUR_LIB"));


Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top