0

我刚刚安装了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>'
4

1 回答 1

0

尝试使示例代码正常工作时遇到了同样的问题。libtcod-mingw.dll我只需将andSDL.dll拖入项目目录即可修复它。

于 2015-05-09T10:16:20.250 回答