From: Luis Lavena Date: 2009-01-19T21:13:36+09:00 Subject: Re: 1.8.6 OCI binary extension question On Jan 17, 7:32 pm, Tim Hunter wrote: > Luis Lavena wrote: > > On Jan 17, 3:00 pm, Tim Hunter wrote: > >> I'm trying to build a new release of RMagick that is compatible with the > >> Ruby 1.8.6 One-Click Installer. In the past I have used MS Visual Studio > >> 2005 Express Edition. > > >> However, new releases of ImageMagick for Windows are built with Visual > >> Studio 2008 and when I build RMagick with the 2005 Visual Studio the > >> resulting library fails, apparently because of some incompatibility. (I > >> confess I am very inexperienced with Windows development, so I'm not > >> sure what the incompatibility would be.) > > >> Does anybody know for sure if a binary extension built with Visual > >> Studio 2008 will work with the current 1.8.6 OCI? > > > Well, could work, but is doom to failure. > > > Visual Studio 2008 links to MSVCR80, which is a different CRT than the > > one used by OCI (MSVCRT). > > > Memory allocated by MSVCR80 cannot be freed by other CRT, if happens, > > will segfault. > > > Out of curiosity, what are the chances of getting ImageMagick built > > with MinGW? MinGW (GCC) + MSYS (for make and such) links to MSVCRT and > > will allow you compile Ruby C Extensions that are compatible. > > > Shameless plug: you can take a look to rake-compiler[1] for cross- > > compilation, so you can generate the extension and the gem from Linux/ > > OSX. > > > On a side note and feature request: if you do it, then please make a > > static library of ImageMagick, so in that way people can start > > installing RMagick gem like a normal gem. > > > Regards, > > -- > > Luis Lavena > > > [1]http://github.com/luislavena/rake-compiler > > Thanks for your reply, Luis. Actually I was thinking about waiting for > the 1.9.1 and then building a static version, as you suggest. Any timeline? > I'm working in getting both 1.8.6 and 1.9.1 build with the same compiler (MinGW) for One-Click Ruby Installer. It's been hard since there are several changes from 1.8.x to 1.9.1 that affect the paths and the recipes for compilation. I'm targeting end of January to mid-February, soon after 1.9.1 go out. > I've already bookmarked rake-compiler. I'll check it out. > Great ;-) -- Luis Lavena