Newbie: Compiling sqlite-ruby

X

Xeon

Hi,

Anybody ever compiled sqlite-ruby with MingW for Windows? Or does
anybody have a precompiled binaries for windows and willing to share?

PS: Does compiling extensions with one compiler (e.g. MingW) means
that the Ruby interpreter must also be compiled with the same compiler
(i.e. can it be used with VC built Ruby binaries)? and why?

TIA
 
S

Shashank Date

Xeon said:
Anybody ever compiled sqlite-ruby with MingW for Windows? Or does
anybody have a precompiled binaries for windows and willing to share?

I do not have MingW, but I compiled one using VC++ 6.0 ... let me
know if it is something you want.
PS: Does compiling extensions with one compiler (e.g. MingW) means
that the Ruby interpreter must also be compiled with the same compiler
(i.e. can it be used with VC built Ruby binaries)?

In this particular case, I think the answer is "yes". But in general "no",
you
cannot mix and match libraries across compilers even if they are for the
same hardware.

.... because the binary file format can be different.

HTH,
-- shanko
 
D

daz

Xeon said:
Hi,

Anybody ever compiled sqlite-ruby with MingW for Windows? Or does
anybody have a precompiled binaries for windows and willing to share?

I can't help specifically because I use the Borland 5.5 (free) compiler.

Just to clarify; you would like a VC compiled sqlite-ruby binary to go
with one of the SQLite "Precompiled Binaries For Windows" from:
http://www.hwaci.com/sw/sqlite/download.html

I think that would be very helpful to "one-click" users.

PS: Does compiling extensions with one compiler (e.g. MingW) means
that the Ruby interpreter must also be compiled with the same compiler
(i.e. can it be used with VC built Ruby binaries)? and why?

The extension-building system wasn't designed with this in mind, but it
is evolving as more people want to do this.

If you built Ruby yourself, you can expect that extensions will build
with little effort.

Using MinGW should be less of a problem than I have with Borland
because (IIUC) gnu is more compatible with VC.



If you don't mind taking risks, could you try it and let us know ?

extconf.rb is likely to recognise your build as mswin and then try
to find "nmake" (VC's "make" utility) - gnu's is "make".
I'm sure you can override this but you may need to ask someone else.
extconf.rb --with-make-prog=make ???

Try running the exconf.rb for sqlite-ruby and look over the mkmf.log .
If a Makefile was created, see if things such as directory paths look OK.
Check:
CC = ??? (compiler)
LDSHARED = ??? (linker ?)
CFLAGS = ??? (compiler options - OK for gnu ?)

blah, blah, etc.


Hope that's of help, but it's just open-forum rambling so that
others can disagree and point you in the proper direction.

Good luck,

:daz
 
O

Osuka Adartse

Xeon said:
Hi,

Anybody ever compiled sqlite-ruby with MingW for Windows? Or does
anybody have a precompiled binaries for windows and willing to share?
Yes and yep, there's no problem compiling it like in anterior sqlites
versions (DOS_UNIX=0,etc...) , latest I got using rubygems.
PS: Does compiling extensions with one compiler (e.g. MingW) means
that the Ruby interpreter must also be compiled with the same compiler
(i.e. can it be used with VC built Ruby binaries)? and why?

TIA
AFAIK Mingw and VC are compatible, I've taken libs from the One-click
installer and copied'em to the appropiate dir.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,149
Messages
2,570,842
Members
47,388
Latest member
EarthaGilm

Latest Threads

Top