From: Lyle Johnson Date: 2001-09-26T23:47:23+09:00 Subject: [ruby-talk:21724] Re: Embedding woes > It compiles and links just fine. After putting the dll somewhere > where it can be found (ie the same dir as the .exe) I try to run > the program and the output is: > > foo > > and then it crashes. Your original code was correct (using rb_cObject as the second argument to rb_define_class). Try adding these compiler flags: /DNT /DIMPORT /MD when compiling your extension code and see if that fixes things. Needless to say, this isn't documented anywhere ;)