Boost logo

Boost Users :

Subject: [Boost-users] 'Multiply defined' errors in Boost 1.38.
From: Dyer, Nigel (N.P.Dyer_at_[hidden])
Date: 2009-02-22 03:37:54


Hi

There is a problem with the 1.38 release of Boost that is preventing me
from compiling using gcc on a mac some code that compiled correctly in
previous releases. I now get lots of 'multiply defined' error messages
when certain boost header files are included in specific ways, e.g.

/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: multiple definitions of
symbol boost::test_tools::(anonymous namespace)::check_is_close
bin/darwin-4.0.1/release/link-static/threading-multi/Lexer/BiobaseLexer.
o definition of boost::test_tools::(anonymous namespace)::check_is_close
in section (__DATA,__common)
bin/darwin-4.0.1/release/link-static/threading-multi/Lexer/ArrayLexer.o
definition of boost::test_tools::(anonymous namespace)::check_is_close
in section (__DATA,__common)

I have attached minimal example which seems to reproduce the problem.

It seems to be associated with the change that was introduced in svn
release r49800.
(https://svn.boost.org/trac/boost/changeset?new=49800%40trunk&old=49793%
40trunk)

I have run bjam -n -a with and without r49800 and also bjam with and
without the r49800 change, which appears to show that the problem arises
after the change has been introduced:

The results are also included in the tar.gz file

Nigel Dyer




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