Subject:
Re: [ruby-ffi] Re: puts example fails in doze
From:
Luis Lavena
Date:
12/11/09 5:25 PM
To:
ruby-ffi@googlegroups.com

On Fri, Dec 11, 2009 at 8:22 PM, rogerdpack <rogerpack2005@gmail.com> wrote:
>> in 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'
>
> in there.
> Now it works. phew!

do not depend on crtdll, use msvcrt instead

http://old.nabble.com/msvcrt-vs.-crtdll-td26406290.html

-- 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