[Boost-bugs] [Boost C++ Libraries] #1871: regex link error with msvc

Subject: [Boost-bugs] [Boost C++ Libraries] #1871: regex link error with msvc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-27 16:24:31


#1871: regex link error with msvc
----------------------------------------+-----------------------------------
 Reporter: cedric.naniot_at_[hidden] | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: regex
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
----------------------------------------+-----------------------------------
 With msvc 8 and 9 using regex (Boost 1.34.1 and 1.35) in code compiled
 with /Zc:wchar_t- result in the following error (multi-threaded DLL):

 msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall
 std::allocator<unsigned short>::allocator<unsigned short>(void)"
 (??0?$allocator_at_G@std@@QAE_at_XZ) already defined in libboost_regex-vc80-mt-
 gd-1_34_1.lib(usinstances.obj)

 Here is a sample to reproduce this issue :

 #include <vector>
 #include <boost/regex.hpp>

 int main()
 {
         {
                 std::vector<wchar_t> Dummy;
                 Dummy.push_back(12);
         }

         boost::wregex RegExp(L".*");
         int Ret = boost::regex_search(L"jkfghsdhg", RegExp);

         return Ret;
 }

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1871>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC