--------------ms040900010709000303040103
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 From my experience using both tool chains on Windows (for the ruby-prof
extension and SWIG-based extensions for GEOS and GDAL).

* You can build Ruby extensions using MingW that run against Ruby built
with VC++.  I've done this with Ruby 1.8.2/1.8.4, various MingW releases
and VC++ 2003 and VC++ 2005.  This used to require changing a small bug
in ruby.h for Ruby 1.8.2, but that bug has been fixed with 1.8.4.  For
more info see
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2206&group_id=426.

* However, you cannot do this with MingW using VC++ built Ruby.

>   ruby extconf.rb
>   make
>   make install

The problem is that extconf is quite limited - it will assume you are
building your extension with the same compiler that built Ruby (VC++).
Python avoids this issue because disutils will recognize the compiler
being used (MingW, VC++) for the extension and provide the correct
command line parameters.

* If mkrf (http://glu.ttono.us/articles/2006/06/28/mkrf-0-1-0-released)
can work like Python distutils, then it will become simple to use MingW
to build extensions that work with VC++

* When compiling with MingW do not link against the ruby *.lib files.
Instead, just link directly against the DLL (msvcrt-ruby18.dll).  Its
faster (links much faster) and works better.

* So you need to manually compile your extension or create a makefile to
do it.  This actually turns out be the way GEOS and GDAL work - they
have autoconf based build systems so extconf.rb wouldn't fit in anyway.

* The advantage of MingW is that it avoids the unmanaged assemblies that
VC++8 uses, so its simpler to deal with (this is a good link about
manage assemblies -
http://www.grimes.demon.co.uk/workshops/fusWSThirteen.htm)

* VC++ has several large advantages on Windows.

First, it lets you debug your extensions while GDB does not support this
on Windows (or if it does, its never worked for me).

Second, it compiles much faster

Third, there is a lot more help available.

Forth, its quite easy to build Ruby extensions.

* Using MingW on Windows is a huge barrier to entry.  Gettting MingW
setup, along with msys, is a time consuming process that only
experienced *Nix developers will understand and be able to do.

* MingW on Windows is not very easy to use.  Its nice to think that you
can download an open source project, type ./configure, make, make
install and it will work.  Alas, it doesn't really work that way. There
are myriad of issues you run into.

First you'll need msys.  Then many projects have prequisites that you'll
have to download and compile.  In addition, you often times have to
change the CFLAGS and LDFLAGS to get successful compiles.  Linking is a
pain and requires hand-holding, and sometime just doesn't work.  Libtool
is really flakey on Windows.  For some projects, you'll have to need to
download/build/install the latest version of it.  You also need to get
autoconf/automake installed.  Many projects require bison - something
I've never been able to successfully compile on Windows. All in all - it
literally took me weeks to figure out how to get everything to work
together. The MingW/msys tool chain is quite complex on Windows, and
most people won't have the time or desire to put forth the effort to get
it to work.

My recommendation:

* Use VC++ 2005 and get Microsoft to tell us how to properly use 
unmanaged assemblies so that we can avoid dll hell

* Make sure that mkrf  supports building Ruby extensions
"out-of-the-box" on Windows using MingW if you have it installed.

I think this would be the best of both worlds - you support both tool
chains.  VC++ is the default one, but MingW should work fine for
building extensions.

Hope this helps - I'd be glad to share more of my experiences if its
helpful.

Charlie




--------------ms040900010709000303040103
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJAzCC
AtwwggJFoAMCAQICEFby1ChIT+pmYLkFBWX20TIwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMT
I1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDUxMzIyNTQyM1oX
DTA3MDUxMzIyNTQyM1owQzEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEgMB4G
CSqGSIb3DQEJARYRY2Zpc0BzYXZhZ2V4aS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
ggEKAoIBAQDDPyi9Z2s8673fAOxX6/EhWhAo2bb8/BcU7xiV49a9TWExEAufzQuAKvKdRWlm
MKuTwdU/QKgrZ1bCcb3cIznHjFI5AmG4nk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