# Compiling problem with WxRuby on mswin-32, Ruby 1.9.1

**URL:** <https://www.ruby-forum.com/t/compiling-problem-with-wxruby-on-mswin-32-ruby-1-9-1/164639>\
**Category:** Ruby\
**Created:** [April 3, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/compiling-problem-with-wxruby-on-mswin-32-ruby-1-9-1/164639 "2009-04-03T15:11:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quintus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/49beb7/32.png) [@quintus](https://www.ruby-forum.com/u/quintus)\
**Post date:** [April 3, 2009, 3:11pm UTC](https://www.ruby-forum.com/t/compiling-problem-with-wxruby-on-mswin-32-ruby-1-9-1/164639/1 "2009-04-03T15:11:55Z")

</div>

Hi,

I’m trying to compile WxRuby for my mswin32-version of Ruby 1.9.1 for  
some days now, but don’t get it to complete (I’m using the MSVC 2008  
compiler on Win XP). First, this is the output of my “ruby -v”:  
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]  
Second, I’ve downloaded the “wxruby-2.0.0.tar.gz” file from Rubyforge  
and extracted it to “D:\Ruby191\lib\ruby\gems\1.9.1\gems\wxruby-2.0.0”.  
Third, I did a cd in the directory and tried to run “rake”, just as said  
in the INSTALL file:  
D:\Ruby191\lib\ruby\gems\1.9.1\gems\wxruby-2.0.0\>rake  
(in D:/Ruby191/lib/ruby/gems/1.9.1/gems/wxruby-2.0.0)  
Enabling STATIC build  
Enabling UNICODE build  
The following wxWidgets features are not available and will be skipped:  
GCDC  
GLCanvas  
GraphicsBrush  
GraphicsContext  
GraphicsFont  
GraphicsMatrix  
GraphicsObject  
GraphicsPath  
GraphicsPen  
StyledTextCtrl  
StyledTextEvent  
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42  
for 80x86  
Copyright (C) Microsoft Corporation. All rights reserved.

cl : Command line warning D9035 : option ‘Og-’ has been deprecated and  
will be r  
emoved in a future release  
cl : Command line warning D9002 : ignoring unknown option ‘-G6’  
AboutDialogInfo.cpp  
C:\Programme\wxWidgets-2.8.10\include\wx/filefn.h(110) : error C2628:  
‘\_off\_t’ f  
ollowed by ‘\_\_int64’ is illegal (did you forget a ‘;’?)  
rake aborted!  
Command failed with status (2): [cl.exe -c  
-IC:/Programme/wxWidgets-2.8.10…]

(See full trace by running task with --trace)

D:\Ruby191\lib\ruby\gems\1.9.1\gems\wxruby-2.0.0\>

The error suggests that there’s something wrong with the WxWidget  
headers, maybe a “missing ‘;’” somewhere. Because I’m not familiar with  
C, I posted this here. I’ve been told at the German ruby forum (see  
[http://forum.ruby-portal.de/viewtopic.php?t=9266](http://forum.ruby-portal.de/viewtopic.php?t=9266)) that there’s maybe a  
wrong type declaration in line 110 of the “filefn.h” of the WxWidget  
headers, because I wasn’t able to find a type named “\_off\_t”:

#ifdef **WXWINCE**  
typedef long off\_t;  
#else  
// define off\_t  
#if !defined( **WXMAC** ) || defined( **UNIX** ) || defined( **MACH** )  
#include \<sys/types.h\>  
#else  
typedef long off\_t;  
#endif  
#endif

#if (defined( **VISUALC** ) && !defined( **WXWINCE** )) || (  
defined( **MWERKS** ) && defined( **INTEL** ) )  
typedef \_off\_t off\_t; //------Line 110-------  
#elif defined( **SYMANTEC** )  
typedef long off\_t;  
#elif defined( **MWERKS** ) && !defined( **INTEL** ) && !defined( **MACH** )  
typedef long off\_t;  
#endif

After some minutes of searching the WxWidget headers, I only found a  
type called “z\_off\_t” in zconf.h (lines 287 - 294) in the “zlib”  
subdirectory:

#if 0 /\* HAVE\_UNISTD\_H – this line is updated by ./configure  
\*/

# include \<sys/types.h\> /\* for off\_t \*/

# include \<unistd.h\> /\* for SEEK\_\* and off\_t \*/

# ifdef VMS

# include \<unixio.h\> /\* for off\_t \*/

# endif

# define z\_off\_t off\_t

#endif

Can there be an error in the header code or am I just doing something  
wrong?  
(Please excuse if my English is not really good, I don’t often use it)

Marvin
