Forum: Ruby Compiling problem with WxRuby on mswin-32, Ruby 1.9.1

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Marvin G. (Guest)
on 2009-04-03 17:11

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:
(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:
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'
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

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


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 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;
    // define off_t
    #if !defined(__WXMAC__) || defined(__UNIX__) || defined(__MACH__)
        #include  <sys/types.h>
        typedef long off_t;

#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;

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"

#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

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

This topic is locked and can not be replied to.