From: Jeremy H. <je...@ch...> - 2006-04-21 06:51:41
|
On Thu, Apr 20, 2006 at 12:08:10PM -0500, Albert Chin wrote: > On Thu, Apr 13, 2006 at 03:51:17PM +0100, Jeremy Henty wrote: > > 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. > > What if you wish to build with the OS vendor C++ compiler? I am hoping these changes will make that happen automatically. On GNU/Linux the Makefile compiles *.cc to *.c using $(CXX) . The CXX variable isn't defined in the Makefile , so I assume GNU make supplies the correct value. To compile the feature tests extconf.rb uses $(CC) , which is set to gcc in rbconfig.rb . Luckily gcc knows that *.cc files are C++ . If things work the same way on your OS then you're done! I can't be sure that they'll work because I don't have access to other OSes. If you can send me the Makefile and mkmf.log that your Ruby-FLTK build creates I can check whether your OS does things the same way as mine. (It would be useful to see rbconfig.rb too.) If the Makefile still chooses the wrong C++ compiler you can try building with "CXX=<correct-compiler> make". If that works I can investigate how to implement a --ccx=<correct-compiler> flag. What do you get when you run "fltk-config --cxx"? If you simply need to build Ruby-FLTK with the same C++ compiler used to build FLTK then maybe I can hack the Makefile to insert "CXX = `fltk-config --cxx`" without having to add new build flags. > I checked out CVS but don't see any changes relative to 0.9.3. There aren't! Sourceforge has stopped sync-ing developer CVS with anonymous CVS while they install new hardware. Anonymous CVS is currently identical to 0.9.3 . I am preparing to release 0.9.4 so you build that and see which compiler it selects. This will happen later today if nothing goes wrong. Cheers, Jeremy Henty |