From: Antonio Terceiro Date: 2011-06-24T08:30:33+09:00 Subject: Re: Explicitly setting compiler to C++ in extconf.rb... --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Darryl L. Pierce escreveu isso a=ED: > Specifically, it's failing since, at line 25 of Exception.h, is: >=20 > #include >=20 > which is a Standard C++ header. But the Makefile generated is always > using gcc (rather than g++) to check. If I dump the checks for the > headers then everything works, but that's not the Right Way(tm) to me to > do this. >=20 > Any help on how to tell Ruby to use g++? You can try something like this: require 'rbconfig' RbConfig::CONFIG['CPP'] =3D RbConfig::CONFIG['CPP'].gsub('gcc', 'g++') require 'mkmf' have_header('string') or raise('You need ') create_makefile('test') --=20 Antonio Terceiro http://softwarelivre.org/terceiro --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOA8x+AAoJEPwNsbvNRgve9xQP/1bJBIyxOJS9ZbXPJkkgSOI8 EudF5NTrFOlUckMp9NXi+EwwiEUgus0svSYdLQUP/JUSQTP3PSQkSkRPIfNk48rO YF/n80TT8cgW39jHmDpEiwEoHXL6y2hlf6Sf3qkgz1VZXqQCtiosf0BwLYny5tJk ZGPo/9k3qX1gP8L8ua9GjONMlPZiZazmbh1+twtVGdxdwEPDAGx2PTlQVYed/7Qf 0OUtzHY5+am95tHTXXDUXJqDpHG20wavFhFl/vmtGQ6CcL0sZE4MWvq4rWk7hVax mXFmNkw4VkTkFTLQ62yMAp7HsXBoSeZzPcQd5qgjBA3l5OW4Cf4yFD43Lslu1Vjp OwnIZanBmqoEbYAO3sJ0FtJu300stSbEmz/Q6ieeo0qOS1Rf9tF/uwR/Y8lT0Te1 uxZMrKkiWYJg/JOUPGxTqvzyCoqQ6201aZIJZArBfnBUiMG1KuoVIe8dZGuDLkmA 6JPf5cExxU2wwxrO927ar0Lx9Djqbd1kHsJITgq5cXvastCqMiKMj1smdKe7Mvpz qul39JYurKh0yi5wVDj57mjSmTBh1X10tNh6FXjGfoVpa8rki4q/I7AmTSa6Y56+ 1ZQjId2IIOo1WWy2h/R97Idy8Xu+v34QsPVW+/WYiTfAjMVnv2tYsRRusnUkhgTt B5jVQEF47qkz144NqEWc =I/pd -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM--