--- daz <dooby / d10.karoo.co.uk> wrote:
> 
> Curt Hibbs wrote:
> >
> > Since the Ruby Installer for Windows is compiled natively (with VC++ 7.1),
> > and your extension is compiled with mingw32, I would expect problems, and
> > perhaps that is the source of the segfaults [...].
> >
> > I'm going to cross post this to the ruby-talk ML, and the ruby-installer-dev
> > ML to get some other opinions on this.
> >
> 
> Hi Curt,
> 
> *Just* an opinion ...
> 
> I wonder if it's _generally_ possible for users of a one-click installer
> to use the Ruby process to add C extensions locally?
> 
> Part of your build creates config.h, config.status & rbconfig.rb which
> reflect your environment, as you know.
> Data such as compiler options are taken from here as input to mkmf.rb
> but bear little, or no relation to the user's environment.
> 
> To be able to install C extensions easily, my assumption was that a
> self-built Ruby would be a prerequisite unless a user was prepared to do
> some serious reworking of the generated makefiles and, maybe, others.

Do you mean compiling extensions, or installing them?  To compile them
you need a C compiler, of course :)  Extensions go into $sitelibdir, which
translates into /ruby-install-directory/lib/ruby/site_ruby/1.8/i386-msvcrt
for the one-click installer, so packages know where to install extensions.

Regarding compiling with mingw32 verses VC++, it's a red herring insofar
as the one-click installer's current problem, as evidenced by the
segfault I demonstrated using a simple "hello world" extension compiled
with VC++ 6.0 SP5.

Having the same compiler used to build the ruby which you are running
certainly helps, but it is by no means necessary as long there is a
standard runtime environment provided, namely msvcrt-ruby18.lib.  The
one-click installer is somehow deviating from that standard, or has
introduced some other issue in the patch it uses.




		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail