Boost logo

Boost Users :

From: gunnarnl (gunnar_at_[hidden])
Date: 2002-03-19 15:42:55


I've created a windows console project with VC++ 6.0 and just used
one of the examples in the documentation. I've also added the
BOOST_HAS_THREADS macro in the settings. The program compiles well in
debug mode but gives the following linking errors:

Compiling...
main.cpp
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: virtual
__thiscall std::runtime_error::~runtime_error(void)" (??
1runtime_error_at_std@@UAE_at_XZ) already defined in main.obj
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::runtime_error::runtime_error(class runtime_error::runtime_error
const &)" (??0runtime_error_at_std@@QAE_at_ABV01@@Z) already defined in
main.obj
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::~basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(void)" (??1?
$basic_strin
g_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAE_at_XZ) already
defined in main.obj
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::runtime_error::runtime_error(class
runtime_error::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)" (??0runtime_error_at_std@@QAE_at_ABV?
$basic_strin
g_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@1@@Z) already defined in
libcpmtd.lib(ios.obj)
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(char const
*,class basic_
string<char,struct std::char_traits<char>,class std::allocator<char>
>::allocator<char> const &)" (??0?$basic_string_at_DU?
$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAE_at_PBDABV?
$allocator_at_D@1@@Z) already defined in main.obj
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of
other libs; use /NODEFAULTLIB:library
Debug/threads.exe : fatal error LNK1169: one or more multiply defined
symbols found
Error executing link.exe.

Any help on this would be appreciated.

Gunnar Olerud


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