Boost logo

Boost :

From: Kristian Lippert (kristian.lippert_at_[hidden])
Date: 2003-04-13 16:27:04


Hi
I have a problem with the boost::filesystem library and MSVC 6.0. I have
build the lib-file for the filesystem library using bjam. I have created a
simple console application and snapped the code from
http://www.boost.org/libs/filesystem/example/simple_ls.cpp.
I have set a path for the lib-file and named it with the
libboost_filesystem.lib in the Object/Library Module.
The program compiles without problems but the linking fails.
I hope that someone can help me?
Best regards,
Kristian Lippert

The errors look like:

--------------------Configuration: boostPathtester - Win32
Debug--------------------
Linking...
msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: class
std::basic_string<char,struct std::char_traitschar>,class
std::allocator<char> > & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::operator+=(char)"
(??Y?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAEAAV01_at_D@
Z) already defined in libcpmtd.lib(locale.obj)

msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: unsigned int __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::size(void)const "
(?size@?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QBEIXZ)
already defined in boostPathtester.obj
msvcprtd.lib(MSVCP60D.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
*)"
(??4?$basic_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@QAEAAV01_at_PB
D_at_Z) already defined in boostPathtester.obj

msvcprtd.lib(MSVCP60D.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_stringchar,struct std::char_traits<char>,class
std::allocator<char> >(char const *,unsigned int,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_PBDIABV
?$allocator_at_D@1@@Z) already defined in libcpmtd.lib(xlocale.obj)

.....
LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other
libs; use /NODEFAULTLIB:library
Debug/boostPathtester.exe : fatal error LNK1169: one or more multiply
defined symbols found
Error executing link.exe.



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk