On Oct 6, 2005, at 5:08 PM, Sean O'Halpin wrote:

> On 10/7/05, Eric Hodel <drbrain / segment7.net> wrote:
>
>> No, it should work on Windows too provided you built your own Ruby.
>> You may need to set some ENV vars as well (like HOME or INLINE_DIR).
>>
> I was wrong - it almost works with the One-Click Installer version. I
> just didn't try hard enough.
>
> The problem appears to be that it isn't picking up msvcrt-ruby18.lib
> on the LINK step. It compiles when I copy the cl command line from the
> error output and add the lib like so:
>
> cl -nologo -LD  -MD -Zi -O2b2xg- -G6 -I
> c:/ruby/lib/ruby/1.8/i386-mswin32 -o Inline_MyTest_cb89.so
> Inline_MyTest_cb89.c  msvcrt-ruby18.lib -link /INCREMENTAL:no
> /EXPORT:Init_Inline_MyTest_cb89
> (with c:\ruby\lib added to the LIB environment variable) but how do I
> get RubyInline to do this?

The C builder has API to do this:

class X
   inline(:C) do |builder|
     builder.add_link_flags "whatever"
     # ...
   end
end

It is fairly well documented. Just generate the rdoc and poke around.

The better route to go is to build your own ruby and it'll pick up  
all the things it needs automatically.

Read rbconfig.rb for where we get all our building information.