【发布时间】:2019-10-31 17:29:05
【问题描述】:
我在同一路径中有两个文件,functions.dll 和 functions.rb,其中包含以下内容:
require 'ffi'
module Foos
extend FFI::Library
ffi_lib 'functions'
end
当我运行它时,它会抛出:
Traceback (most recent call last):
4: from functions.rb:6:in <main>
3: from functions.rb:9:in <module:Foos>
2: from C:/Ruby/lib/ruby/gems/2.5.0/gems/ffi-1.11.1-x64-mingw32/lib/ffi/library.rb:98:in ffi_lib
1: from C:/Ruby/lib/ruby/gems/2.5.0/gems/ffi-1.11.1-x64-mingw32/lib/ffi/library.rb:98:in map
C:/Ruby/lib/ruby/gems/2.5.0/gems/ffi-1.11.1-x64-mingw32/lib/ffi/library.rb:151:in block in ffi_lib: Could not open (LoadError): The specified module could not be found.
Could not open library 'functions.dll': The specified module could not be found.
知道为什么它可能找不到文件吗?
【问题讨论】: