Gennadiy Rozental wrote:
"Kolya"
wrote in message news:1f5259800705230242hb812523mc864b34c6d35e145@mail.gmail.com... Hi, All! I am using Boost.Test library in my own application and I have included boost/test/unit_test.hpp in many my cpp-files. When I used boost version 1.33.1 all works fine. But in version 1.34 I have following compiler error:
file1.obj : error LNK2005: "class unit_test_log_t::boost::unit_test_log_t & boost::unit_test::`anonymous namespace'::unit_test_log" (?unit_test_log@? A0xa35d3712@unit_test@boost@@3AAVunit_test_log_t@23 @A) already defined in file2.obj
Looks liek clear compiler bug. Anounimus namespace is used specifically to avoid duplicate symbols.
It's very common for compilers to become confused when an anonymous namespace resides in a precompiled header.