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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
85991f138ede6236f35eb98da22b7b01?d=identicon&s=25 Marvin Gülker (quintus)
on 2009-04-03 15:11
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) 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
This topic is locked and can not be replied to.