Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-05-23 13:08:28


Gennadiy Rozental wrote:
>> "Kolya" <wxkolya_at_[hidden]> wrote in message
>> news:1f5259800705230242hb812523mc864b34c6d35e145_at_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_at_unit_test_at_boost@@3AAVunit_test_log_t_at_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.


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