Subject: Re: [ruby-ffi] Re: unable to find method? |
From: Luis Lavena |
Date: 12/20/09 10:19 AM |
To: ruby-ffi@googlegroups.com |
On Sun, Dec 20, 2009 at 12:16 AM, rogerdpack <rogerdpack@gmail.com> wrote:
ffi_convention :stdcall
before the attach_function call
Confirmed, it works.http://gist.github.com/260343 Are you using ffi 0.5.4?Hmm. Even with :stdcall mine is still segfaulting (1.9.1, 1.8.6) Could you try this code?
Yes, but doing things inside a module and calling from it. It works. What you did is extend Object with FFI::Library, dunno how that is going to end. I would recommend you stick your FFI calls and functions to modules in the future, and avoid bogus errors because of that.-- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry