> c:\Ruby193>ruby -v > ruby 1.9.3p429 (2013-05-15) [i386-mingw32] > c:\Ruby193>rails -v > Rails 3.2.13 > c:\mysql-connector-c-noinstall-6.0.2-winx64 > This is problem: > C:/Ruby193/bin/ruby.exe extconf.rb > creating Makefile > make > generating generator-i386-mingw32.def > compiling generator.c > In file included from c:/Ruby193/include/ruby-1.9.1/ruby.h:32:0, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:109:14: error: size of array > 'ruby_check_sizeof_voidp' is negative > In file included from c:/Ruby193/include/ruby-1.9.1/ruby.h:32:0, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h: In function 'rb_class_of': > c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1333:12: warning: cast to pointer from integer > of different size [-Wint-> to-pointer-cast] > c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h: In function 'rb_type': > c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1349:12: warning: cast to pointer from integer > of different size [-Wint-> to-pointer-cast] > In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0, > from c:/Ruby193/include/ruby-1.9.1/ruby.h:32, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:/Ruby193/include/ruby-1.9.1/ruby/missing.h: At top level: > c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:44:8: error: redefinition of 'struct > timespec' > In file included from c:\ruby193\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../.. > /../../x86_64-w64-> mingw32/include/process.h:12:0, > from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:62, > from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223, > from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67, > from c:/Ruby193/include/ruby-1.9.1/ruby.h:32, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:\ruby193\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32 > /include/sys/types.h:89:8: > note: originally defined here > In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0, > from c:/Ruby193/include/ruby-1.9.1/ruby.h:32, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:51:8: error: redefinition of 'struct > timezone' > In file included from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:63:0, > from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223, > from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67, > from c:/Ruby193/include/ruby-1.9.1/ruby.h:32, > from ../fbuffer/fbuffer.h:5, > from generator.c:1: > c:\ruby193\mingw\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32 > /include/time.h:260:8: note: > originally defined here > In file included from generator.c:1:0: > ../fbuffer/fbuffer.h: In function 'fbuffer_append_str': > ../fbuffer/fbuffer.h:118:25: warning: cast to pointer from integer of different size > [-Wint-to-pointer-cast] > ../fbuffer/fbuffer.h:118:25: warning: cast to pointer from integer of different size > [-Wint-to-pointer-cast] > generator.c: In function 'convert_UTF8_to_JSON_ASCII': > generator.c:129:35: warning: cast to pointer from integer of different size [-Wint- > to-pointer-cast] > generator.c:130:38: warning: cast to pointer from integer of different size [-Wint- > to-pointer-cast] > generator.c: In function 'convert_UTF8_to_JSON': > generator.c:227:23: warning: cast to pointer from integer of different size [-Wint- > to-pointer-cast] > generator.c:228:25: warning: cast to pointer from integer of different size [-Wint- > to-pointer-cast]
任何帮助都会有所帮助。
答案 0 :(得分:2)
DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe的快速修补程序
“禁用”c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:44
...
#if 0 && !defined(HAVE_STRUCT_TIMESPEC)
...
#if 0 && !defined(HAVE_STRUCT_TIMEZONE)
...
适用于我Win7-x64 / Ruby193-x32
答案 1 :(得分:0)
我在这里搜索“错误:重新定义'struct timespec'”。最终我发现我使用Ruby的版本为Ruby 2和Ruby 1.9。我从这里下载了正确版本的devkit:http://rubyinstaller.org/downloads/现在一切正常。认为此信息可能有助于未来的用户。