[fxruby-users] fxruby-1.6.17 failure to compile
lyle at lylejohnson.name
Wed Dec 24 10:26:25 EST 2008
On Dec 23, 2008, at 6:34 PM, Len Lawrence wrote:
> Downloaded fxruby-1.6.17.gem
> Switched to root
> gem install --local ./fxruby-1.6.17.gem
> Extracts from the error reports:
> FXRuby.cpp: In function ‘void FXRbRegisterRubyObj(VALUE, const
> FXRuby.cpp:253: error: cast from ‘const void*’ to ‘unsigned int’
> loses precision
> Does this mean that there is something wrong with my environment or
> are these genuine errors?
Are you compiling with a 64-bit compiler? I mean, it looks that way.
Ugh. I wish the compiler treated those as warnings and not errors, but
What's happening is that we're trying to cast a void * (pointer-to-
void) to an unsigned int. And on 32-bit platforms, those two types are
the same size (32 bits), and so there's no error. That's why I didn't
see this error at compile time (and why most folks probably won't).
On a 64-bit OS, however, a pointer is 64 bits long, while an unsigned
int is still just 32 bits long. (Aren't you glad you program in Ruby
and don't have to worry about arcane stuff like this?). So we're
getting a compile error for those casts.
Let me work-up a patch and post back here when I've got something
(hopefully, soon). I don't want to do a 1.6.18 release until we're
sure it's compiling properly on your machine, so this make take an
iteration or two.
Thanks for the heads-up,
More information about the fxruby-users