From 9e7e1ba009a58de5cc1f35fe41cda9e3c339b93a Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 15 Apr 2006 17:21:19 +0000 Subject: [PATCH] Fix for duplicate symbol errors when using VC7.1 without /Zc:wchar_t [SVN r33706] --- src/usinstances.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/usinstances.cpp b/src/usinstances.cpp index 3fe54a36..35400006 100644 --- a/src/usinstances.cpp +++ b/src/usinstances.cpp @@ -24,6 +24,11 @@ #define BOOST_REGEX_US_INSTANTIATE #ifdef _DLL_CPPLIB +// +// This is a horrible workaround, without declaring these symbols extern we get +// duplicate symbol errors when linking if the application is built without +// /Zc:wchar_t +// namespace std{ template _CRTIMP2 bool __cdecl operator==( const basic_string, allocator >&, @@ -40,6 +45,7 @@ template _CRTIMP2 bool __cdecl operator<( template _CRTIMP2 bool __cdecl operator>( const basic_string, allocator >&, const basic_string, allocator >&); +template<> _CRTIMP2 std::size_t __cdecl char_traits::length(unsigned short const*); } #endif