我过去在windows下成功安装了带有ruby的gem mysql2,但现在它显示出一个奇怪的错误
checking for main() in -llibmysql... no
没有拼写错误,我的控制台真的显示-llibmysql
而不是-libmysql
(我认为它应该只是libmysql
而没有任何破折号)
我已按照this link的所有说明操作,我的命令看起来像
gem install mysql2 -- '--with-mysql-lib="c:\Dev\MySQL_Connector\lib" --with-mysql-include="c:\Dev\MySQL_Connector\include"'
...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Bibliotheques/Dev/Ruby200-x64/bin/ruby.exe extconf.rb --with-mysql-lib=c:\Dev\MySQL_Connector\lib --with-mysql-in
clude=c:\Dev\MySQL_Connector\include
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using --with-mysql-dir=c:\Dev\MySQL_Connector
-----
checking for main() in -llibmysql... no