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

W

Wes Gamble

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
 
E

Eric Hodel

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?

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

Daniel Berger

Wes said:
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
 
W

Wes Gamble

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
 
A

ara.t.howard

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

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
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top