Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-09-07 08:32:21


Folks, I have a configuration problem I don't know how to solve, so I'm
soliciting for ideas.

Here's the basic problem:

Boost.TR1 has to replace some of the std library headers, and forward to the
existing "real" ones. To do this it can either:

1) Use #include_next to forward to the real std lib header.
2) Use #include <../some_directory/header_name> to forward to the std lib
header.

Up until now, I've been using #1 with GCC, unfortunately if Boost is
installed in /usr/include then it doesn't work: because the Boost include
path appears *after* the std library one rather than before it.

So... in response to a bug-report I recently changed it to method 2 (on
Linux anyway), using the same configuration logic as STLport to determine
what "some_directory" is called. Having tested it locally with several gcc
versions on Linux everything seemed fine... except it's not: the problem is
that gcc has a configuration option that lets you change the name of the
directory the headers go in, and several Linux distro's change it from the
default, so instead of being the normal default of something like "4.2.0"
it's g++-v4 or something else that we can't automatically deduce :-(

Obviously I could add a user-config macro for this purpose, but it's all a
real pain basically :-(

Anyone any better ideas? Or should I give up before I loose the will to
live ! ;-)

Thanks! John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk