Ruby/DL2のIOまわりが・・・
セグってます。。。最新にしてみてもだめだった。IOをFILE*に変換してるあたりでしくってるんだろうか。
ただhttp://www.garbagecollect.jp/ruby/mswin32/ja/から貰ってきた1.8.5p2にhttp://rubyforge.org/projects/ruby-dl2/の0.6を入れたバージョンだとちゃんと動いてるので、もしかしたらコンパイル環境が悪いのかも?
どなたか情報持ってたら教えてください。
>type test.rb require 'dl/import' module A extend DL::Importer dlload "msvcrt.dll" extern "int printf(char*)" extern "int fprintf(FILE*,char*)" printf("hello world!\n") fprintf($stdout,"hello world2!\n") end >ruby test.rb hello world! C:/soft/ruby/lib/ruby/1.9/dl/func.rb:31: [BUG] Segmentation fault ruby 1.9.0 (2006-12-05) [i386-mswin32_80] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.