I’m trying to build wxRuby-2.0.0 with Ruby 1.9.1-p0 and SWIG 1.3.39
using VC8, but so far I didn’t manage to do it. First of all, is there
some information available online for building wxRuby with Visual
Up to now I’ve found three problems: one that I could solve, another
that I could avoid and a third one that blocked me completely
(Goldilocks and the Three Compiler Errors! - ok, no more jokes, I
promise). I’d be grateful if anyone could help me with these problems.
The first problem was with a wxWidgets include file, “wx/filefn.h”. When
compiling wxRuby, the following error was shown:
error C2628: ‘_off_t’ followed by ‘__int64’ is ilegal
I found online a solution for this, but I don’t know if it’s the correct
one. See http://forum.videolan.org/viewtopic.php?f=2&t=792. In filefn.h,
add the condition !defined(_OFF_T_DEFINED) before the definition of
off_t. The modified code is:
#if (!defined(_OFF_T_DEFINED) && defined(VISUALC) &&
!defined(WXWINCE)) || ( defined(MWERKS) && defined( INTEL) )
typedef _off_t off_t;
The second problem was that the class wxGLCanvas was not defined when
compiling wxRuby. I edited manually the GLCanvas.cpp file generated by
SWIG and added “#define wxUSE_GLCANVAS 1”. Could you tell me what is the
correct place to set this option?
And finally, the third problem is that when building wxRuby with Rake
some classes cannot be found by fixmodule.rb. I get the following
ERROR! swig/fixmodule.rb Didn’t find swig class
Command failed with status (1): [ruby swig/fixmodule.rb
I tried to modify fixmodule.rb and got everything to compile, but then
the linking failed with many undefined references to extern symbols like
cWxToplevelWindow. What am I doing wrong?
I don’t think it’s related, but I’m using a version of Rake built with
Ruby 1.8.6 and I’m trying to build wxRuby for Ruby 1.9.1.
Thanks in advance for your help.