> Yep.  I'd be very interested to know if cygwin's gcc can be shoehorned
> to generate Windows-compatible binaries.

What do you mean Windows-compatible binaries? If you mean ruby extensions,
then it's trivial to create them using gcc; however, you have to have the
cygwin ruby installed rather than the one-click installer. Once you have
cygwin and cygwin/ruby installed, it's just a matter of using extconf.

$ cat extconf.rb
require 'mkmf'
create_makefile("Test")

$ ruby extconf.rb
$ make
# make install

And that's it, gcc has been "shoehorned" into creating a ruby C-extension
under windows.

> I think there's an issue beyond mere object code, and that's
> libraries.  But I'd like to experiment.

I've had a number of issues turning non-trivial C libraries into DLLs using
gcc under windows. For my last project, I ended up dropping the DLL idea and
just compiling my library to object code because I was having too many problems.

One last thing. On the issue of compiler compatability, I was recently bitten
by the fact that some versions of VC++ don't support variable length arrays,
so I would reccomend avoiding using them if you plan on people compiling
your library using VC++. I'm talking about the situation where you have
something to the effect of.

char buffer[size+1]; // breaks on some versions of VC++

Cheers,
Travis Whitton <whitton / atlantic.net>