Closed Burgestrand closed 12 years ago
This was (hopefully) fixed in FFI v1.0.10, see related commit here: https://github.com/ffi/ffi/commit/89000c9461c180fa6630c58cde24dfd641535888
Keeping the issue open until I have confirmation.
Oh, one more thing it appears; I need to use ffi_convention :stdcall
for it to pick the names up on windows. I’ll make a minor release for this.
http://rdoc.info/github/ffi/ffi/master/FFI/Library#ffi_convention-instance_method
Hah, I fail, forgot the minor release thingy. While I’m on the topic, it’s probably wise to only do the :stdcall thingy on windows. Who knows what things I could screw up. One can work around it with the following code, though.
module Spotify
@ffi_convention = :stdcall
end
require 'spotify' # after we’ve done the thing above!
This issue has been around for ages. I have no idea how Hallon fares on windows either, so for now I’ll leave windows as unsupported.
Following error is raised when loading Hallon:
This is a result of name mangling in windows DLLs.
As of currently, this can be hacked (really, it’s evil) around by hooking the
attach_function
method in FFI::Library, and then iterating over the arguments to calculate the total byte size to finally mangle the name before trying to bind it.