Cygwin版のRubyで自分で作った拡張ライブラリをコンパイルすると

g++ -I/usr/local/include/opencv -I.
-I/usr/local/lib/ruby/1.8/i386-cygwin
-I/usr/local/lib/ruby/1.8/i386-cygwin -I. -c opencv.cpp
g++ -I/usr/local/include/opencv -I.
-I/usr/local/lib/ruby/1.8/i386-cygwin
-I/usr/local/lib/ruby/1.8/i386-cygwin -I. -c point.cpp
g++ -I/usr/local/include/opencv -I.
-I/usr/local/lib/ruby/1.8/i386-cygwin
-I/usr/local/lib/ruby/1.8/i386-cygwin -I. -c matrix.cpp
g++ -I/usr/local/include/opencv -I.
-I/usr/local/lib/ruby/1.8/i386-cygwin
-I/usr/local/lib/ruby/1.8/i386-cygwin -I. -c iplimage.cpp
gcc -shared -s -Wl,--enable-auto-import,--export-all -L'/usr/local/lib'
-o opencv.so opencv.o point.o matrix.o iplimage.o -lruby -lhighgui
-lopencv -lstdc++ -lcrypt
matrix.o(.text+0x172):matrix.cpp: undefined reference to
`st_init_numtable()'
collect2: ld はステータス1で終了しました
make: *** [opencv.so] エラー1

と言われてコンパイル出来ないのですがどうしたらいいのでしょうか。他の環境
(FreeBSDやLinux)ではこれで問題ないのですが…。

extconf.rb
---
#!/usr/local/bin/ruby
=begin
create Makefile for Ruby/OpenCV.
=end
require "mkmf"
$objs = ["opencv.o", "point.o", "matrix.o", "iplimage.o"]

$CFLAGS = "-I/usr/local/include/opencv"
$LDFLAGS = "-L/usr/local/lib"

['stdc++', 'opencv', 'highgui'].each{|lib|
exit(1) unless have_library(lib)
}
create_makefile("opencv")
---

---
--------------------------------------
 [ Kanagawa University ]
 Masakazu Yonekura
 mail: kazu / goto.info.kanagawa-u.ac.jp
--------------------------------------