Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
HOWTO?: fix extconf.rb to use g++?
Jeremy Henty
1/3/2005 12:39:00 PM
Is there a supported way to get extconf.rb to use g++ instead of gcc?
I found the following references but none of them give a really
definitive answer.
http://www.angelfire.com/electronic2/issac/rb_cpp_e...
http://www.rubygarden.com/ruby?WritingExte...
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...
This came up when I tried to fix the build of ruby-fltk. It uses this
hack:
# Use "g++" instead of "gcc"
CONFIG.each{|key, val|
if( val =~ /gcc/ )
CONFIG[key] = CONFIG[key].gsub("gcc", "g++")
end
}
if( defined?(LINK) )
LINK.gsub!("gcc", "g++")
end
if( defined?(CPP) )
CPP.gsub!("gcc", "g++")
end
.... but it doesn't work in Ruby 1.8.2 ; the configuration tests still
run gcc , so some of them misfire, the build gets misconfigured and
breaks. My current fix is:
[ Config::CONFIG, Config::MAKEFILE_CONFIG, ].each{|config|
config.each{|key, val|
if( val =~ /gcc/ )
config[key] = config[key].gsub("gcc", "g++")
end
}
}
if( defined?(LINK) )
LINK.gsub!("gcc", "g++")
end
if( defined?(CPP) )
CPP.gsub!("gcc", "g++")
end
.... which seems to work but I've no idea if I've covered all the
bases. Any suggestions?
Cheers,
Jeremy Henty
2 Answers
Asbjørn Reglund Thorsen
1/4/2005 11:06:00 AM
0
Jeremy Henty
1/4/2005 9:42:00 PM
0
Asbjørn Reglund Thorsen <asbjoert@ifi.uio.no> wrote:
> Is there any good how-to`s about extending Ruby with c++? I have
> found one, but it`s quite old:=20
>
http://www.angelfire.com/electronic2/issac/rb_cpp_e...
.
Thanks, but I already found that. I included a link to it in my
original posting. Unfortunately it doesn't address any of the
problems I'm having with the Ruby-FLTK build.
Cheers,
Jeremy Henty
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
HOWTO?: fix extconf.rb to use g++?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password