When I try to link a test suite I get this:
ld: multiple definitions of symbol boost::test_tools::(anonymous namespace)::check_is_close
mspathCEntry_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data)
ModelBuilder_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data)
ld: multiple definitions of symbol boost::test_tools::(anonymous namespace)::check_is_small
mspathCEntry_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data)
ModelBuilder_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data)
LinearProduct_test.o definition of boost::test_tools::(anonymous namespace)::check_is_close in section (__DATA,__data)
LinearProduct_test.o definition of boost::test_tools::(anonymous namespace)::check_is_small in section (__DATA,__data)
.....
This is with boost 1.33 on Darwin/OS-X. The same code was building OK
with the 1.31 libraries (and 1.32 on linux, I think). I'm using libtool. Here's the makefile output before those errors (I've deleted some of the files on the command line to save space):
../libtool --mode=link --tag=CXX g++ -o test1 -g AbstractTimeStepsGenerator.o Coefficients.o -lboost_unit_test_framework -L/usr/local/lib/boost-1_33_1
g++ -o test1 -g AbstractTimeStepsGenerator.o Coefficients.o Covariates.o -Wl,-bind_\
at_load -lboost_unit_test_framework -L/usr/local/lib/boost-1_33_1
There are several copies of various flavors of the library lying around, but I don't think any are on the default library paths. So I think I'm only getting the one in /usr/local/lib/boost-1_33_1.
It looks as if each invocation of, e.g., BOOST_CHECK_CLOSE, is
generating a defiition for the symbols on which I'm getting
duplicates. But why would it do that?
Any suggestions, or ideas what might be going wrong?
Thanks.
Ross Boylan
Here are some possibly relevant details. Example code:
--------------------------------------------------
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <iterator>
#include <vector>
#include