[Boost-bugs] [ boost-Bugs-1470041 ] regex linking error with VC 7.1

Bugs item #1470041, was opened at 2006-04-13 12:38 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1470041&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: regex Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: John Maddock (johnmaddock) Summary: regex linking error with VC 7.1 Initial Comment: 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<unsigned short>::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 <string> #include <boost/regex.hpp> 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". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1470041&group_id=7586 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net