----- Original Message -----From: Kristian LippertSent: Sunday, April 13, 2003 11:27 PMSubject: [boost] Problems with filesystem and msvc 6.0Hi
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 LippertThe 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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@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@DU?$char_traits@D@std@@V?$allocator@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@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.