Ошибка при создании расширения Ruby в C

образец
Исходный код (включая makefile)

Я делаю тест для образца выше,
Но когда я компилирую его получил ошибку !
Я сделал это неправильно?

H:Rubytest_ymalMyTest>make
compiling MyTest.c
In file included from d:/RailsInstaller/Ruby2.2.0/include/ruby-2.2.0/ruby/define
                 from d:/RailsInstaller/Ruby2.2.0/include/ruby-2.2.0/ruby/ruby.h
                 from d:/RailsInstaller/Ruby2.2.0/include/ruby-2.2.0/ruby.h:33,
                 from MyTest.c:2:
d:/RailsInstaller/Ruby2.2.0/include/ruby-2.2.0/ruby/win32.h:319:44: warning: 'st
 extern int clock_gettime(clockid_t, struct timespec *);
                                            ^
d:/RailsInstaller/Ruby2.2.0/include/ruby-2.2.0/ruby/win32.h:320:43: warning: 'st
 extern int clock_getres(clockid_t, struct timespec *);
                                           ^
linking shared-object mytest.so
process_begin: CreateProcess(NULL, rm -f mytest.so, ...) failed.
make (e=2):
Makefile:253: recipe for target 'mytest.so' failed
make: [mytest.so] Error 2 (ignored)
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: mytest-i38
mytest-i386-mingw32.def: file not recognized: File truncated
collect2.exe: error: ld returned 1 exit status
Makefile:253: recipe for target 'mytest.so' failed
make: *** [mytest.so] Error 1

—- добавить к 2016/05/03 ———————-

H:Rubytest_ymalMyTest>make
generating mytest-i386-mingw32.def
compiling MyTest.c
linking shared-object mytest.so
process_begin: CreateProcess(NULL, rm -f mytest.so, ...) failed.
make (e=2):
Makefile:271: recipe for target 'mytest.so' failed
make: [mytest.so] Error 2 (ignored)

но тот (mytest.so) файл протестирован в ruby в порядке .
как решить эту ошибку?
process_begin: CreateProcess (NULL, rm-f mytest.Итак,…) неудачный

irb(main):003:0> require 'H:Rubytest_ymalMyTestmytest.so'
=> true
irb(main):004:0> include MyTest
=> Object
irb(main):005:0> puts test1
10
=> nil
irb(main):006:0> exit

1 ответ