[wxruby-development] Building wxRuby and Ruby 1.8.7 on Windows

Alex Fenton
Tue, 23 Dec 2008 19:32:05 -0000

Hi Chauk-Mean

> I followed your advice and took successfully the MinGW way ...
>

Thanks for your patience. I''m on holiday at the moment and
won''t have
access to a Windows dev environment until January so can''t try it out
myself. Below is a patch which I hope will fix this; please try at your
convenience.

> Then I built ruby-1.9.1-preview
>

What does ruby19 -v tell you? Just to confirm that I''m using the same
preview on OS X:

Abaddon:~ alex$ ~/bleed/bin/ruby -v
ruby 1.9.1 (2008-12-01 revision 20438) [i386-darwin9.5.0]

> After a cleanup of wxRuby (rake19 clean, rake19 clean_src), the rake
> gem task produces the following output :
>
> D:\HOME\wxruby2>rake19 gem WXRUBY_VERSION=1.9.9
> (in D:/HOME/wxruby2)
> Enabling UNICODE build
> Class: AboutDialogInfo
> class wxAboutDialogInfo
> In file included from C:/opt/ruby19/include/ruby19-1.9.1/ruby/io.h:24,
>                  from
C:/opt/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../incl
> ude/direct.h:22,
>                  from C:/opt/ruby19/include/ruby19-1.9.1/ruby/win32.h:48,
>                  from
C:/opt/ruby19/include/ruby19-1.9.1/ruby/defines.h:192,
>                  from C:/opt/ruby19/include/ruby19-1.9.1/ruby/ruby.h:70,
>                  from C:/opt/ruby19/include/ruby19-1.9.1/ruby.h:32,
>                  from src/AboutDialogInfo.cpp:826:
> C:/opt/ruby19/include/ruby19-1.9.1/ruby/encoding.h:74: error:
`VALUE'' was not de
> clared in this scope

I think the wrong header file is getting included - ruby''s
<ruby/io.h>
instead of MingW''s <io.h>. Looking at it, I believe this arises
from a
naive attempt on my part to fix compatibility against an early preview
of 1.9.0. The SWIG patch (which has now been accepted) is the correct
way to fix this.

Please can you try applying the attached patch to our
rake/rakeconfigure.rb. Alternatively, if it''s easier to edit direct,
just delete line 44, which reads

    File.join(Config::CONFIG["rubyhdrdir"], "ruby") ]

And replace the comma on the preceding line with a "]" to close the
array.

Let me know how it goes. It seems to have no effect (as expected) on OS
X. If it doesn''t work out, please run rake with -v so we can see the
gcc
command line issued by rake.

thanks
alex


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rakeconfigure_for_mingw19.patch
URL:
<http://rubyforge.org/pipermail/wxruby-development/attachments/20081223/ef0c7bf0/attachment.pl>