Take a look at rb_cObject in one of Your moduels' function. Then cmopare it with one of Ruby interpreter itself. If they differ You have not define smth. You have to define NT=1 and IMPORT... But are You importing the interpreter's code from mswin32-ruby16.dll or build the C-code into Your module? While latter You should not define IMPORT :)