From: Jeremy H. <je...@ch...> - 2006-04-13 14:52:35
|
On Wed, Apr 12, 2006 at 09:03:16AM +0100, Jeremy Henty wrote: > On Thu, Apr 06, 2006 at 12:28:30AM -0500, Albert Chin wrote: > > > ruby-fltk uses the same compiler used to build ruby. However, if > > fltk was built with a C++ compiler, ruby-fltk should use it in > > extconf.rb, especially if a non-GCC compiler was used. > > I'm not sure I understand. Both FLTK and Ruby-FLTK are written in > C++ so they are *always* built with a C++ compiler. Ruby-FTLK uses > a hack: extconf.rb loads cxx.rb , which goes through the > configuration and replaces gcc for g++ . Do you need something like > this to happen for non-gcc compilers too? OK, I've investigated a little more. It turns out that Ruby-FTLK's cxx.rb hack is clunky and overkill. The Makefile correctly specifies $(CXX) for *.cc files, so the library gets built with g++ (at least on my GNU/Linux system it does). The real need for the cxx.rb hack is so that feature tests for C++ code are compiled with g++ . However you can do that much more easily simply by setting CONFTEST_C = "conftest.cc", so that the .cc extension tells gcc that the test source is C++ . I have committed this change to CVS. > > How about addition an option, --with-cxx=<compiler> to use for the > > compile tests in extconf.rb? How would I do this? You know, I just reread this passage of yours more carefully and noticed you referred specifically to "the compile tests in extconf.rb". If that's your problem then the change I just committed may help. Can you check out the latest CVS[1] and see if it works? It would be really useful for me to know how this works on a non-GNU system. (What is your system, by the way?) Cheers, Jeremy Henty [1] cvs -d :pserver:ano...@cv...:/cvsroot/ruby-fltk login cvs -d :pserver:ano...@cv...:/cvsroot/ruby-fltk checkout -P ruby-fltk |