Boost logo

Boost Users :

Subject: Re: [Boost-users] 'Multiply defined' errors in Boost 1.38.
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-02-24 04:11:06


Dyer, Nigel wrote:

> Hi Volodya
>
> Apologies... I now see that the boost documentation says that the gcc
> compiler prior to 4.2 does not support anonymous namespaces in
> precompiled headers. I am using the Darwin compiler that comes with the
> Apple Servers, and had rather assumed it was based on a current gcc, but
> I see that it is still based on gcc 4.0.1. The simple workaround is to
> not use precompiled headers. I have also showed that the problem can be
> fixed by removing the boost libraries from the pre-compiled headers that
> use anonymous namespaces, either directly or indirectly.
>
> Your other comments were very useful, although I am still looking into
> why the <use>/boost/filesystem//boost_filesystem is needed in the pch
> definition on the mac, when it does not appear to be necessary on other
> platforms.

Nigel,

in general, you always need to build PCH and the application with the same
set of defines. I do not know if other compilers you have tested are less
picky, or silently don't use PCH.

> I have found a number of other problems mainly relating to dependency
> checking

In Boost.Build? I know that tracking dependency problems is not fun, but
it's only possible to fix them if you come up with a remotely reproducible
test case. Please make sure you are using the latest Boost.Build, e.g. nightly
built package on boost.org/boost-build2

Thanks,
Volodya


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