On Jun 23, 2011, at 7:30 PM, Antonio Terceiro wrote:

> require 'rbconfig'
> RbConfig::CONFIG['CPP'] = RbConfig::CONFIG['CPP'].gsub('gcc', 'g++')
> require 'mkmf'
> have_header('string') or raise('You need <string>')
> create_makefile('test')

Don't do this. The following is sufficient:

require 'mkmf'
have_library('stdc++')
create_makefile('laser/BasicBlock')

That's a working extconf.rb for a gem I'm actively working on. Adding stdc++
makes mkmf use g++ on my system.

Michael Edgar
adgar / carboni.ca
http://carboni.ca/