Here it is. The problem was I didn't use makefiles generated by
extconf.rb.
The only thing I need to build my extension with MS CC or Intel's
compiler was definition:

#define NT=1

Just like it defined in makefiles.

Since NT is defined macro EXTERN in ruby.h is rolled out correctly and
rb_cObjects are the same.

# -----Original Message-----
# From: Aleksei Guzev [mailto:aleksei.guzev / bigfoot.com] 
# Sent: 29  2001 ?. 12:13
# To: ruby-talk ML
# Subject: [ruby-talk:17052] Problem building extension
# 
# 
# 
# rb_cObject given to my extension by mswin32-ruby16.lib and 
# rb_cObject in Ruby itself are not the same.
# 
# I did not investigate the problem at all. Does anyone know 
# what's wrong?
#