From: Martin Stannard Date: 2001-11-16T22:50:28+09:00 Subject: [ruby-talk:25428] Ruby & SWIG Hi, I'm attempting to use SWIG to build a ruby module on w2k and VC6.0. After compiling Examples\Ruby\simple example in the SWIG-1.3.9 distribution I get an error when running run.rb: SWIG-1.3.9\Examples\ruby\simple\run.rb:3:in `require': 127: The specified procedure could not be found. - Init_example (LoadError) ./example.dll The dll is found but the function doesn't seem to be exported from the dll correctly. Here the function def from example_wrap.c: /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ #ifdef __cplusplus extern "C" #endif void Init_example(void) { int i; mExample = rb_define_module("Example"); _mSWIG = rb_define_module_under(mExample, "SWIG"); for (i = 0; swig_types_initial[i]; i++) { swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]); SWIG_define_class(swig_types[i]); } rb_define_module_function(mExample, "gcd", _wrap_gcd, 2); rb_define_singleton_method(mExample, "Foo", Foo_get, 0); rb_define_singleton_method(mExample, "Foo=", Foo_set, 1); } Has anyone had any success with this? regards, Martin