Curt Hibbs wrote: > On 3/31/06, Joel VanderWerf <vjoel / path.berkeley.edu> wrote: >> Austin Ziegler wrote: >>> On 3/18/06, Kaspar Schiess <eule / space.ch> wrote: >>>> Hello Glenn, >>>> >>>>> Question is, which is the best (free) compiler for the job? Visual >>>>> C++ or Borland? Or another? >>>> I won't say mine's best, however all RMagick binary releases are compiled >>>> using mingw and msys. I think they integrate posix/unix stuff nicely with >>>> windows while guaranteeing binary compatibility with other windows builds. >>>> >>>> Just thought I'd complete the thread with what works for me. >>> Note that mingw/msys builds are NOT compatible with VC++2003 or >>> VC++2005 builds because of a different runtime environment. At a >>> minimum, there is a mismatch between where errno is defined (somehow). >>> >>> If you are using the One-Click Installer for 1.8.2, you will need to >>> compile extensions with VC++2003 (using MSVCR71.DLL); if you are using >>> the One-Click Installer for 1.8.4, you will be able to compile >>> extensions with VC6 or msys/mingw. You MUST NOT mix the versions or >>> bad things may happen to your Ruby programs. >> I've done a little work with an extension compiled with VC++2003 and >> ruby-1.8.4, One-Click. Am I just lucky that it works? Or is that known >> to be OK? > > You're lucky. > > It all depends on what Windows APIs it uses in combination with other > Windows API calls outside of the extension. One known culprit is the > global variable ERRNO which is physically part of the runtime DLL -- > and there is a different runtime DLL for each compiler version. So if > you extension calls an API that sets ERRNO, and another part of Ruby > checks the value of ERRNO, they will be using different memory > locations, with unpredictable results. Hm, any plans to migrate the One-Click Installer to VC++2003? -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407