Change
#define BOOST_TEST_SINGLETON_INST( inst ) \
namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst,
_t)::instance(); }
to
#define BOOST_TEST_SINGLETON_INST( inst ) \
namespace { static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst,
_t)::instance(); }
in trivial_singleton.hpp
Gennadiy
"Christian Henning"
Hi Gennadiy, were you able to find a solution for my problem? I would really need a fix, here. Let me know if there is anything I can help you out with. My solution right now is to put all my tests into one file which is not a good one.
Thanks, Christian
On 7/11/07, Christian Henning
wrote: Hi Gennadiy,
This fix only solved one of the LNK2005s. The following error is still appearing:
error LNK2005: "class unit_test_log_t::boost::unit_test_log_t & boost::unit_test::`anonymous namespace'::unit_test_log" (?unit_test_log@?A0x7aa5c0d5@unit_test@boost@@3AAVunit_test_log_t@23@A) already defined in database_test.obj
Does this fix only applies to MSVC 7.1 only?
Thanks, Christian
On 7/10/07, Gennadiy Rozental
wrote: I've seen this error mentioned
Try changing
namespace { bool dummy_cond = false; }
to
namespace { static bool dummy_cond = false; }
in test_tools.hpp
Gennadiy
"Christian Henning"
wrote in message news:949801310707091519w3f187714o3d212031fb31da7d@mail.gmail.com... Hi there, I'm using boost 1.34 on MSVC 7.1. For whatever reason I cannot eliminate various linker errors. I have defined my BOOST_AUTO_TEST_CASEs in several .cpp files and this seems to create multiple definition of various symbols. The errors look as the following:
string_table_test.obj : error LNK2005: "bool boost::test_tools::`anonymous namespace'::dummy_cond" (?dummy_cond@?A0x7aa5c0d5@test_tools@boost@@3_NA) already defined in ORM_test.obj string_table_test.obj : error LNK2005: "class unit_test_log_t::boost::unit_test_log_t & boost::unit_test::`anonymous namespace'::unit_test_log" (?unit_test_log@?A0x7aa5c0d5@unit_test@boost@@3AAVunit_test_log_t@23@A) already defined in ORM_test.obj
Did anyone had to deal which such messages before?
Thanks ahead, Christian
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users