Boost logo

Boost Users :

From: Christian Henning (chhenning_at_[hidden])
Date: 2007-07-11 10:45:41


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_at_unit_test_at_boost@@3AAVunit_test_log_t_at_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 <gennadiy.rozental_at_[hidden]> 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" <chhenning_at_[hidden]> wrote in message
> news:949801310707091519w3f187714o3d212031fb31da7d_at_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_at_test_tools_at_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_at_unit_test_at_boost@@3AAVunit_test_log_t_at_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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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