From: Michael Edgar Date: 2011-06-24T11:22:22+09:00 Subject: Re: Explicitly setting compiler to C++ in extconf.rb... On Jun 23, 2011, at 10:07 PM, Darryl L. Pierce wrote: > On 06/23/2011 07:39 PM, Michael Edgar wrote: >> >> 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. > > Hrm, no joy. It's still failing with the same error in mkmf.log. Just checked, and you're right - same thing happens to me if I insert a "have_header" for one of my header files. It's failing because mkmf is creating a file called "conftest.c" and not "conftest.cc" - changing the name of the file makes it work. Ugh. It looks like a bug in mkmf.rb:407, in "cpp_command," it uses CONFTEST_C which ends in .c . Michael Edgar adgar@carboni.ca http://carboni.ca/