Boost logo

Boost-Build :

Subject: Re: [Boost-build] Compile error when including single boost posix_time.hpp header
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2014-01-19 18:30:06


On Jan 18, 2014, at 9:26 PM, Stephen Greenfield <StephenG_at_[hidden]> wrote:

> I've run into a seemingly impenetrable compile error related to Boost, which I've reduced to including a single boost header file. In compiling (with GCC 4.2 on Mac OS X 10.6.8) an empty file containing only this include:
>
> #include "boost/date_time/posix_time/posix_time.hpp"
> ...generates these errors:
>
> In file included from ../../../Boost Libraries/Boost_1_55_0/boost/type_traits/has_left_shift.hpp:43,
> from ../../../Boost Libraries/Boost_1_55_0/boost/lexical_cast.hpp:165,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/string_parse_tree.hpp:13,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/period_parser.hpp:14,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/date_facet.hpp:23,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/gregorian/gregorian_io.hpp:16,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/gregorian/gregorian.hpp:31,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_formatters.hpp:12,
> from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/posix_time.hpp:24,
> from /Users/homedir/dev/TheProject/Mac/Xcode/../Source/feature/test.cpp:12:../../../Boost Libraries/Boost_1_55_0/boost/type_traits/detail/has_binary_operator.hpp:155: error: expected unqualified-id before 'do'In file included from ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/posix_time.hpp:34,
> from /Users/homedir/dev/TheProject/Mac/Xcode/../Source/feature/test.cpp:12:../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_parsers.hpp:40: error: expected `}' at end of input
> ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_parsers.hpp:40: error: expected unqualified-id at end of input
> ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_parsers.hpp:40: error: expected `}' at end of input
> ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_parsers.hpp:40: error: expected `}' at end of input
> ../../../Boost Libraries/Boost_1_55_0/boost/date_time/posix_time/time_parsers.hpp:40: error: expected `}' at end of input
> These Boost libraries are being used as "headers only" -- unbuilt.
>
> Xcode is generating: /Developer/usr/bin/gcc-4.2 –x c++ (plus all the other options, paths, etc)
>

You’ve run into “Apple Macros Hell”; as described in
        https://svn.boost.org/trac/boost/ticket/2115
and https://svn.boost.org/trac/boost/ticket/6219

There’s a discussion there.

— Marshall



Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk