|
Boost Users : |
Subject: [Boost-users] [boost.build] multiple definitions of symbols at link since revision 49800.
From: Nigel Dyer (N.P.Dyer_at_[hidden])
Date: 2008-12-10 08:20:18
Hello
I am using the trunk release of boost, and started having problems with
multiple definitions of symbols during linking (see example linker output
below). I can cure the problem by removing the change to
tools\build\v2\build\generators.jam introduced in revision 49800.
It only seems to occur if the following headers:
#include <boost/test/floating_point_comparison.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
are included in precompiled headers which are included in cpp files that are
created by the antlr parser generator. It occurs on a compilation with
darwin, but not msvc.
It is unclear whether the generator.jam change has identified a waekness in
the boost libraries, or there is a problem with the revision 49800 change
that only surfaces in obscure circumstances, or the change has highlighted a
problem in my code. It can be fixed by removing the includes from the
precompiled header. I feel this should not be necessary
As a boost newbie it is unclear whether I should I change my code or raise a bug report. I would be grateful for suggestions.
Nigel
Example linker failures.
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: multiple definitions of symbol
boost::test_tools::(anonymous namespace)::check_is_close
/Volumes/RAID1/xraid/data/bifa/Dev/Projects/Bio/bin/Bio/darwin-4.0.1/release/link-static/libbio.a(BiobaseLexer.o)
definition of boost::test_tools::(anonymous namespace)::check_is_close
in section (__DATA,__const)
/Volumes/RAID1/xraid/data/bifa/Dev/Projects/Bio/bin/Bio/darwin-4.0.1/release/link-static/libbio.a(ArrayLexer.o)
definition of boost::test_tools::(anonymous namespace)::check_is_close
in section (__DATA,__const)
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