From: "Darryl L. Pierce" Date: 2012-04-18T21:30:38+09:00 Subject: extconf.rb and checking for C++ headers I'm extending our project [1] with some native extensions. Our code is written (currently) all in C++, and we use Swig to provide Ruby bindings. For the extconf.rb file previous I've just had: ---8<[snip]--- require 'mkmf' create_makefile('nonblockio') ---8<[snip]--- However, now I'd like to customize the file a little more in order to support both Ruby 1.8 and 1.9. Between those two versions of Ruby we have a different set of header files that are required. So, anyway, I've added the following the check for headers: ---8<[snip]--- require_header("qpid/messaging/exceptions.h") require_header("qpid/messaging/Address.h") require_header("qpid/messaging/Connection.h") ---8<[snip]--- The problem comes with the first header. It's being found, but because it contains C++ includes, specified: #include mkmf is failing saying it "can't find" the header, though the error is: /usr/local/include/qpid/types/Exception.h:25:18: fatal error: string: No such file or directory How do I tell mkmf to use C++ headers? [1] http://qpid.apache.org -- Darryl L. Pierce Visit the Infobahn Offramp: "Bury me next to my wife. Nothing too fancy..." - Ulysses S. Grant