通过Win32API调用系统内部dll(如:Kernel等)没有任何问题,但调用外部dll时异常,大概信息如下:
Win32API.new("test.dll", "GetSum", ["i","i"], "i").call(1,2)
(eval) [BUG] Segmentation faultruby 1.9.3p194 (2012-04-20) [i386-mingw32]
[NOTE]You may have encountered a bug in the Ruby interpreter or extension libraries.Bug reports are welcome.For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
具体信息见https://gist.github.com/aogail/3492796/raw/e992526c0f9e093b79a4085b9c5f37c0b00cdd07/ruby
google发现些类似的问题,有说版本问题,也有说ruby代码问题。 可是在1.8.7、1.9.3、2.0上都是一样的错误 ,代码也曾按照网上的方式修改过,就是没有解决方法,求解!
原文地址:ruby调用外部dll异常, 感谢原作者分享。 我没啥文化,,来求助大家了. 古代的,现在的. 都行