From: Lyle Johnson Date: 2002-12-20T23:02:10+09:00 Subject: Re: msys w/ FXRuby Norman Su wrote: > Any ideas? Am I supposed to use a different version of ruby? Am I doing > something incredibly stupid? I *doubt* this has been fixed on the (CVS) trunk or it would have been back-ported to the 1.6 branch. ISTR the other time we saw it was for the Solaris build. I was trying to do the Right Thing (tm) by using Ruby's ALLOCA_N() but this kind of hassle (for you and other users) just isn't worth it. I'll change those cases so that they use FXMALLOC (a wrapper around the regular malloc) for next time. As a workaround, you should be able to modify the code for FXGLViewer_readPixels() to look like this: VALUE FXGLViewer_readPixels(FXGLViewer *self,FXint x,FXint y,FXint w,FXint h){ FXuchar *buffer; VALUE pixels = Qnil; if (self->readPixels(buffer, x, y, w, h)) { FXint size = 3*w*h; pixels = rb_str_new((char *) buffer, size); FXFREE(&buffer); } return pixels; } Looks like there are a few more of them in ui_wrap.cpp. If it's not clear how to hack those to use FXMALLOC() or just a regular malloc(), let me know and I can post some patches for those functions as well. Hope this helps, Lyle P.S. I'll take out that '-fno-strict-prototype' too. That was a way to work around the broken Ruby header files, but since they're fixed for Ruby 1.6.8 this shouldn't be needed anymore...