From: "QUEISSER,ANDREW (HP-Corvallis,ex1)" Date: 2002-04-18T04:17:44+09:00 Subject: RE: visual c, ruby, and fastcall hassle Try explicitly casting your function to the correct type (or just try a cast to void * for starters). I have no idea if your functions will end up with compatible calling conventions but if the void * makes the code run you can figure out what the correct typecast should be. Try: rb_define_method(cTest,"Bang",(void*)cTestBang,0); There's also a define RUBY_METHOD_FUNC which looks like it might be the right function point type. I haven't built any extensions yet so I'm just guessing. rb_define_method(cTest,"Bang",RUBY_METHOD_FUNC(cTestBang),0); Andrew > -----Original Message----- > From: Lorien Dunn [mailto:loriend@bigpond.com] > Sent: Wednesday, April 17, 2002 10:04 AM > To: ruby-talk@ruby-lang.org > Subject: Re: visual c, ruby, and fastcall hassle > > > All I was doing was something like this in a project > with __fastcall as > default: > > static VALUE cTest; > > static VALUE __cdecl cTestBang(VALUE self,VALUE arg) > { > rb_iv_set(self,"@arg",arg); > puts("Bang!"); > } > > void Init_Test() > { > rb_iv_set > cTest = rb_define_class("Test"); > rb_define_method(cTest,"Bang",cTestBang,0); > } > > and linking this in with the application that embeds > ruby and links to jet, > and calling Init_Test() after ruby_init(). So I'm afraid I > don't understant > what you mean I should wrap. I'm not wanting to wrap Jet- > just make the > needful parts of the game scriptable. > > > Thanks, > Lorien >