Boost logo

Boost Users :

From: Marcus Krantz (krantz.marcus_at_[hidden])
Date: 2005-11-13 04:52:35


Hi all!

I have an application which uses STLport 5.0.0, libtorrent (which in
turn uses Boost). What I have done is that I have compiled the boost
libraries for msvc7.1-stlport. I only uses three, i.e. filesystem,
date_time and thread. My boost version is 1.33.1

So the problem occurs when my application is linking. Then I get a lot
of LNK2005 link errors. I have no problems with compiling my code and
use the boost libraries it's only when I'm about to link it fails. The
errors says, in general, that a lot of things already are defined in
libboost_xxx_mt-sp...
I guess that if I post some of my errors it will be easier for those who
wants to help me :) So here we go...

1.
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator+=(char
const *)"
(??Y?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAEAAV01_at_PBD@Z)
already defined in
libboost_filesystem-vc71-mt-sp-1_33_1.lib(path_posix_windows.obj)

2.
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
std::basic_string<unsigned short,struct std::char_traits<unsigned
short>,class std::allocator<unsigned short> > & __thiscall
std::basic_string<unsigned short,struct std::char_traits<unsigned
short>,class std::allocator<unsigned short> >::erase(unsigned
int,unsigned int)"
(?erase@?$basic_string_at_GU?$char_traits_at_G@std@@V?$allocator_at_G@2@@std@@QAEAAV12_at_II@Z)
already defined in libboost_date_time-vc71-mt-sp-1_33_1.lib(greg_month.obj)

3.
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: char __thiscall
std::basic_ios<char,struct std::char_traits<char> >::widen(char)const "
(?widen@?$basic_ios_at_DU?$char_traits_at_D@std@@@std@@QBEDD_at_Z) already
defined in libboost_thread-vc71-mt-sp-1_33_1.lib(once.obj)

4.
msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
std::basic_ostream<char,struct std::char_traits<char> > * __thiscall
std::basic_ios<char,struct std::char_traits<char> >::tie(void)const "
(?tie@?$basic_ios_at_DU?$char_traits_at_D@std@@@std@@QBEPAV?$basic_ostream_at_DU?$char_traits_at_D@std@@@2_at_XZ)
already defined in libboost_thread-vc71-mt-sp-1_33_1.lib(once.obj)

I would really appreciate if anyone could help me out here. Since I am
new to C++ etc. I have major difficulties in intepreting the error
messages.

Best regards
Marcus Krantz


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