Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-10 12:26:02


Chris Little <cslittle_at_[hidden]> writes:

> on 10/9/02 9:00 AM, Martin Stone at yg-boost-users_at_[hidden] wrote:
>
> > I get this too when using Code Warrior for PlayStation2 with
> > <boost/smart_ptr.hpp>.
> >
> > It appears that the compiler-supplied <cstddef> simply contains #include
> > <stddef.h>, so ptrdiff_t is not getting defined in the std namespace. Doing
> > this:
> >
> > namespace std{using ::ptrdiff_t;}
> > #include <boost/smart_ptr.hpp>
> >
> > fixes it, but I'm not sure that this is strictly allowed.
> >
> > If anybody knows a better fix, please let me know.
> >
>
> Martin,
>
> Are you sure you know which files are being included from where?
>
> One problem I have notices with using Boost and Metrowerks is that since
> Boost includes headers files with the same name as the standard header files
> if you are not careful with the paths then the files from Boost are included
> and not Metrowerks'.
>
> What I do is setup my System Paths so that MSL is searched first and then
> Boost.

I think that's a mistake, Chris. The only place Boost includes headers
with the same names as standard ones is in the compatibility
library. If we are replacing any standard headers, it's intentional. I
think the reason you have trouble with CW is their crazy convention of
automatically enabling *recursive* search through any of the #include
paths you specify. IMO you should turn that off and specify each
directory explicitly, so you know what you're getting.

-- 
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net