Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2002-11-14 14:10:45


> With the following line in my Microsoft Vc7 program:
>
> std::cout << to_simple_string(d) << std::endl;
>
>
> I get the following linker errors:
>
> error LNK2005: "public: __thiscall std::locale::id::id(unsigned int)"
> (??0id_at_locale@std@@QAE_at_I@Z) already defined in stdafx.obj
>
> error LNK2005: "private: __thiscall type_info::type_info(class
> type_info const &)" (??0type_info@@AAE_at_ABV0@@Z) already defined in
> LIBCD.lib(typinfo.obj)
>
>
> error LNK2005: "private: class type_info & __thiscall
> type_info::operator=(class type_info const &)" (??
> 4type_info@@AAEAAV0_at_ABV0@@Z) already defined in LIBCD.lib(typinfo.obj)

Is this with 1.29 or with the current CVS version? Since these
are multiply defined symbols you might think about taking
this out of the pre-compiled headers.

> Clearly I am missing something important!
>
> I did put
>
> #define DATE_TIME_INLINE
>
> in my stdafx.h file and that allowed me to create dates (date d(...))
> but clearly something else is needed (for IO related stuff?)...
>
> Do I have to for instance recreate the libboost_date_time.lib file
> with different settings? I just used 'bjam "-sTOOLS=vc7" "-
> sBUILD=debug release"'.

This all looks correct to me except that I'm not sure this
has been tried with pre-compiled headers...

Jeff


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