Ryan I downloaded RubyInline and tried it on my Windows XP (Home Edition). This is what I got: ---------------------------------------------------------------------------- -- C:\>ruby -v example.rb ruby 1.7.2 (2002-07-02) [i386-mswin32] RubyInline 1.0.4 Building /tmp/Mod_MyTest_fastfact.so with 'cl -LD -nologo -MD -DNT=1 -Zi -O2b2xg - -G5 -I C:/ruby/lib/ruby/1.7/i386-mswin32' C:/ruby/lib/ruby/site_ruby/inline.rb:55:in `initialize': No such file or directory - "/tmp/Mod_MyTest_fastfact.c" (Errno::ENOENT) from C:/ruby/lib/ruby/site_ruby/inline.rb:55:in `new' from C:/ruby/lib/ruby/site_ruby/inline.rb:55:in `inline' from example.rb:16:in `fastfact' from example.rb:34 from example.rb:34:in `each' from example.rb:34 C:\>cd "Program Files" C:\Program Files>dir cl.exe /s Volume in drive C has no label. Volume Serial Number is 1C37-1503 Directory of C:\Program Files\Microsoft Visual Studio .NET\Vc7\bin 01/05/2002 05:48 AM 81,920 cl.exe 1 File(s) 81,920 bytes ---------------------------------------------------------------------------- ---- What am I missing ? TIA, -- Shanko "Ryan Davis" <ryand / ZenSpider.com> wrote in message news:20020910231156.GB15852 / greed.zenspider.com... > On 2002-09-10T17:15:25, Pat Eyler wrote: > > From: Pat Eyler <pate / red-bean.com> > > To: ruby-talk ML <ruby-talk / ruby-lang.org> > > > maybe someone would like to post a code sample of Inline::C from ruby? > > Here is the snippet from example.rb: > > def fastfact(*args) > inline args, <<-END > int i, f=1; > for (i = FIX2INT(argv[0]); i >= 1; i--) { f = f * i; } > return INT2FIX(f); > END > end > > Basically, this is the body of the function you'd have to write if you > were to write a "real" extern. This gets extracted, compiled, linked > into a .so, required/loaded, and run in the first call to this > method. The second call to this method (in the same runtime) just runs > the optimized version. Another call in another runtime would jump to > the require/loaded stage unless the script had been edited since last > compile. >