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

Alex Fenton
Fri, 19 Dec 2008 00:56:11 -0000

Hi Chauk-Mean

Chauk-Mean P wrote:
> I''m trying to build completely Ruby and wxRuby from scratch with
> Visual C++ 2008 Express SP1 (which is freely available) on Windows XP
> SP2.
>


Thanks for trying this and reporting back. I haven''t ever tried
building
with VC++ 2008. My understanding was that not all Ruby standard
libraries could be built with VC++ versions > 6.0 or 7.1.

> So here is where I am :
> - I built successfully zlib 1.1.4 (zlib-1.1.4-1-src.zip from
> http://jarp.does.notwork.org/win32)
> - I built successfully ruby-1.8.7-p72
> - I installed successfully rubygems-1.3.1
> - I installed successfully the rake-0.8.3 gem
> - I built successfully wxWidgets 2.8.9 with all the required options
> (GL canvas and GDI+ ...)
> - I installed winswig-1.3.35 with the little patch for Lib/ruby/file.i
> for ruby-1.9.1
>
> Now when I want to build wxRuby :
>
...
> As you can see, AboutDialogInfo.obj has been built successfully.
> But there is an error with AcceleratorEntry.
>
> Questions :
> - Which versions of Visual C++ are currently supported if I rebuild
> everything from scratch like what I did ?
>

I''m currently using VC 7.1 to provide the mswin binary gems (building
wxWidgets, and then wxRuby against the one-click installer).

VC 6.0 is not supported by wxWidgets 2.8, and using VC 8.0 + creates big
headaches with the one-click installer (it requires shipping dlls and
manifests; we tried this with 1.9.6 or .7 and ended up trashing
people''s
ruby installations. oops).

So for wxRuby the only officially supported VC++ is 7.1. This can''t be
downloaded from Microsoft but is not too hard to find...

> - Can the error above be fixed ?

Probably, but I personally have no plans to work adding support for
different MSVC versions. The one-click installer is being rebuilt using
MingW, which is freely available and produces binaries that are as fast
or faster than those compiled with recent MSVC [1]. The downsides are
that the compiler itself is considerably slower and the binaries are bigger.

We''ll continue to supply binary gems for wxRuby for Windows (including
for ruby 1.9, shortly), but in the longer term I can foresee MSVC
getting phased out. Personally I prefer working with the Unix-ish
toolset on all three platforms, and I don''t have the sense that there
are lots of people out there working from source on MSVC (unlike eg
Linux) to help develop that platform.

If you want to try out Ruby 1.9 + wxRuby on Windows now, I''d recommend
using MingW - get it via Luis Lavena''s easy installer + the patched GDI
header files. I''ve got a complete working set up with this route, and
happy to help track down any problems you run into.

cheers
alex


[1]