2015-04-03 38 views
0

我剛剛安裝了libtcod ruby gem,我想查看演示是否有效。當我開始演示時,它給了我一個錯誤:嘗試啓動使用libtcod for ruby​​的程序時出錯

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

有試圖讓示例代碼工作的同樣的問題。 我通過將libtcod-mingw.dllSDL.dll拖到項目目錄中來修復它。

我不知道爲什麼它甚至會檢查gems文件路徑。它匹配100%,但它永遠不會找到libtcod-mingw.dll

相關問題