我刚刚安装了libtcod ruby gem,我想知道该演示是否有效。当我开始演示时,它给了我一个错误:
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:133:in `block in ffi_lib': Coul (LoadError)ibrary 'libtcod-mingw': The specified module could not be found.
.
Could not open library 'libtcod-mingw.dll': The specified module could not be found.
.
Could not open library 'C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/clib/i686/libtcod-mingw.dll': The specified moR♀)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:100:in `map'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:100:in `ffi_lib'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod/bindings.rb:23:in `<module:TCOD>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod/bindings.rb:3:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from C:/Users/<some user>/Desktop/libtcod.rb:1:in `<main>'
答案 0 :(得分:0)
试图让示例代码工作时遇到同样的问题。
我只需将libtcod-mingw.dll
和SDL.dll
拖到项目目录中即可修复它。
我不知道为什么它甚至无法检查gems文件路径。它匹配100%,但它永远不会找到libtcod-mingw.dll
。