Subject: Re: [ruby-ffi] Re: puts example fails in doze |
From: Luis Lavena |
Date: 12/11/09 5:31 PM |
To: ruby-ffi@googlegroups.com |
On Fri, Dec 11, 2009 at 8:27 PM, Wayne Meissner <wmeissner@gmail.com> wrote:
<rogerpack2005@gmail.com>:2009/12/12 rogerdpackin windows, this code fails: require 'ffi' module Hello extend FFI::Library attach_function 'puts', [:string], :int end Hello.puts("Hello, World")appears it needed an extra ffi_lib 'crtdll'I just updated the samples to use FFI::Library::LIBC as the library. That resolves to 'libc.so.6' on linux, and 'msvcrt.dll' on windows. Can someone verify that blindly using msvcrt.dll like that won't cause problems on windows?
It will only affect Ruby compiled with Visual Studio, since they link to msvcr80 or msvcr90. For the time being, that would work, but maybe an alternative can be cooked.-- 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