关于ruby mysql库安装的问题.

关于ruby mysql库安装的问题.

环境:Win XPSP2,ruby 1.8.6,mysql-ruby-2.7.3.tar.gz
安装时执行下面两个命令:
ruby extconf.rb
ruby extconf.rb --with-mysql-dir=D:/MySQL5 --with-mysql-include=D:/MySQL5/include --with-mysql-lib=D:/MySQL5/lib
皆报错误(mysql安装目录为D:/MySQL5):
checking for main() in libmysql.lib... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
打开mkmf.log文件,里面的内容如下:
have_library: checking for main() in libmysql.lib... -------------------- no

"cl -nologo -Feconftest -I. -ID:/ruby/lib/ruby/1.8/i386-mswin32 -I. -ID:/ruby/lib/ruby/1.8/i386-mswin32 -ID:/MySQL5/include -ID:/MySQL5/include -MD -Zi -O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib libmysql.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link -libpath:"D:/ruby/lib" -libpath:"D:/MySQL5/lib" -stack:0x2000000"
checked program was:
/* begin */
1: #define WIN32_LEAN_AND_MEAN
2: #include <winsock2.h>
3: #include <windows.h>
4:
5: /*top*/
6: int main() { return 0; }
7: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

"cl -nologo -Feconftest -I. -ID:/ruby/lib/ruby/1.8/i386-mswin32 -I. -ID:/ruby/lib/ruby/1.8/i386-mswin32 -ID:/MySQL5/include -ID:/MySQL5/include -MD -Zi -O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib libmysql.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link -libpath:"D:/ruby/lib" -libpath:"D:/MySQL5/lib" -stack:0x2000000"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { main(); return 0; }
/* end */

有哪位遇到过吗,望!

你可能感兴趣的:(C++,c,mysql,windows,Ruby)