How do I tell extconf.rb/mkmf NOT to try and use cl.exe

I'm trying to compile an extension on Windows using ruby extconf.rb.

However, if I try it in Cygwin or in a command window (with MinGW's bin
directory in the PATH), it fails and the mkmf.log file shows that the
"cl" executable is being run.

I don't have a "cl" on my Windows system, so I need gcc to be used.

How do I indicate to mkmf.rb that I'm running under Cygwin or MinGW?

Thanks,
Wes

···

--
Posted via http://www.ruby-forum.com/.

Rebuild ruby with cygwin/mingw. You can't necessarily link cygwin/mingw libraries into your ruby.

···

On Jan 23, 2007, at 10:52, Wes Gamble wrote:

I'm trying to compile an extension on Windows using ruby extconf.rb.

However, if I try it in Cygwin or in a command window (with MinGW's bin
directory in the PATH), it fails and the mkmf.log file shows that the
"cl" executable is being run.

I don't have a "cl" on my Windows system, so I need gcc to be used.

How do I indicate to mkmf.rb that I'm running under Cygwin or MinGW?

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!

Wes Gamble wrote:

I'm trying to compile an extension on Windows using ruby extconf.rb.

However, if I try it in Cygwin or in a command window (with MinGW's bin
directory in the PATH), it fails and the mkmf.log file shows that the
"cl" executable is being run.

I don't have a "cl" on my Windows system, so I need gcc to be used.

How do I indicate to mkmf.rb that I'm running under Cygwin or MinGW?

Thanks,
Wes

Within your extconf.rb file, "$CC = gcc" should work

Or, set your CC environment variable.

Regards,

Dan

Neither of those seems to work, although I thought that they would.

Why am I doing Ruby development on a Windows box?!!???!!
@#$&*@)(#$&@$&#@)&

Thanks anyway.

Wes

···

--
Posted via http://www.ruby-forum.com/.

you can do it. follow these steps

   - build ruby under cygwin/mingw
   - use THAT ruby to build extensions
   - you'll have to hack the install process to go into one-click-installer
     space
   - test heavily - the binaries should work, but might not

i've done exactly this to produce a gsl (gnu scientific lib) that one can
install under windows

   http://codeforpeople.com/lib/ruby/rb-gsl-win/

alternatively you can

   - delete the one click installer
   - compile your self under mingw (don't use cygwin or binaries will require it)
   - have a fully functional ruby

regards.

-a

···

On Wed, 24 Jan 2007, Wes Gamble wrote:

Neither of those seems to work, although I thought that they would.

Why am I doing Ruby development on a Windows box?!!???!!
@#$&*@)(#$&@$&#@)&

Thanks anyway.

Wes

--
we can deny everything, except that we have the possibility of being better.
simply reflect on that.
- the dalai lama