From: Charlie Savage Date: 2009-03-13T17:07:28+09:00 Subject: [ruby-core:22870] [Bug #1281] sdbm extension missing #include ruby.h Bug #1281: sdbm extension missing #include ruby.h http://redmine.ruby-lang.org/issues/show/1281 Author: Charlie Savage Status: Open, Priority: Normal Category: ext, Target version: 1.9.1 ruby -v: ruby 1.9.2dev (2009-03-12) [i386-mswin32_90] Compiling with VC2008, -W3, there are a number of undefined functions. Problem is that _sdbm.c does not include the ruby header file. I'm not sure if it should be: #include "ruby.h" - or - #include Different extensions do it different ways. I went with the first choice. cl -nologo -I. -I../../.ext/include/i386-mswin32_90 -I../.././../include -I../.././../ext/sdbm -MDd -Zi -RTC1 -W3 -wd4996 -Od -Zm600 -DRUBY_EXTCONF_H=\"extconf.h\" -I. -I./.. -I./../missing -DLIBRUBY_SO=\"ruby19.dll\" -IC:\Development\msvc\include -Fo_sdbm.obj -c -Tc../.././../ext/sdbm/_sdbm.c _sdbm.c ../.././../ext/sdbm/_sdbm.c(201) : warning C4013: 'open' undefined; assuming extern returning int ../.././../ext/sdbm/_sdbm.c(222) : warning C4013: 'close' undefined; assuming extern returning int ../.././../ext/sdbm/_sdbm.c(268) : warning C4013: 'lseek' undefined; assuming extern returning int ../.././../ext/sdbm/_sdbm.c(269) : warning C4013: 'write' undefined; assuming extern returning int ../.././../ext/sdbm/_sdbm.c(443) : warning C4013: 'read' undefined; assuming extern returning int ---------------------------------------- http://redmine.ruby-lang.org