id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 603,regex linking error with VC 7.1,nobody,John Maddock,"{{{ I see this error when linking against libboost_regex-vc71-mt-1_33_1.lib: msvcprt.lib(MSVCP71.dll) : error LNK2005: ""public: static unsigned int __cdecl std::char_traits::length(unsigned short const *)"" (?length@?$char_traits@G@std@@SAIPBG@Z) already defined in libboost_regex-vc71-mt-1_33_1.lib(usinstances.obj) libs/regex/src/usinstances.cpp appears to have problems. Steps to reproduce: - Create a console project with VC7.1. - Set Character Set to ""Use Unicode Character Set"" - Use a Multi-threaded DLL - Link against libboost_regex-vc71-mt-1_33_1.lib - wchar_t should NOT be set as a native type - Use the following code: #include ""stdafx.h"" #include #include int _tmain(int argc, _TCHAR* argv[]) { #if _UNICODE std::wstring strCurLine(L""sdfsdfggg""); std::wstring strMatchExp(L""lsdfkjsflk""); boost::wcmatch Matched; boost::wregex regex(strMatchExp.c_str()); #else std::string strCurLine(""sdfsdfggg""); std::string strMatchExp(""lsdfkjsflk""); boost::cmatch Matched; boost::regex regex(strMatchExp.c_str()); #endif boost::regex_search(strCurLine.c_str(), Matched, regex); return 0; } There are no linking errors if you build with wchar_t as a native type or build with character set as ""Use Mutli-Byte Character Set"". }}}",Bugs,closed,,regex,None,,Fixed,,