Michael Davis <mdavis / sevasoftware.com> writes:

> I created a very small C library for Ruby.  It compilies and works great on Windows 2000 using cygwin.  On Windows XP, however, I get the following run-time error:
> 
> Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32.rb:4 - dlopen: Win32 error 5 - /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32_ext.so /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32.rb:4:in `require': dlopen: Win32 error 5 - /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32_ext.so (LoadError)
>         from /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32.rb:4
>         from /usr/local/lib/ruby/site_ruby/1.6/locana/locana_bindings.rb:101:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.6/locana/locana_bindings.rb:101
>         from /usr/local/lib/ruby/site_ruby/1.6/locana.rb:279:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.6/locana.rb:279
>         from tst/tst_locana.rb:15:in `require'
>         from tst/tst_locana.rb:15
> 
> Has anyone seen this error before and/or have any suggestions on how to work around it?  I an running the latest cygwin on XP.  The gcc compiler is gcc version 3.2 20020927 (prerelease).  
> 
> Any suggestions on how to work around this issue is greatly appreciated.

Check the permission of the so file:

  $ ls -l /usr/local/lib/ruby/site_ruby/1.6/locana_gui_mswin32_ext.so

It needs execute permission.

-- 
eban