RegEx VC6.0 error LNK2005 errors

Hello, I am new to the list and I already have an issue. LOL. I downloaded the latest BOOST because I need regex to support UNICODE (so I do have UNICODE and _UNICODE in the project settings) and release build is OK but in debug I have the errors LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswalpha already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswupper already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswlower already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswdigit already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswxdigit already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswspace already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswpunct already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswcntrl already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj) I found the workaraund at http://aspn.activestate.com/ASPN/Mail/Message/2509074 but it doesn't work for me Could some one please help me on this.... MSVC6.0 SP6, Window XP with the latest MS SDK. Thanks in advance, Alex. Thank you again, Alex. mailto:alexbalaev@yahoo.com ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com

On Thursday 30 June 2005 18:10, Alexander Balaev wrote:
I downloaded the latest BOOST because I need regex to support UNICODE
It's just Unicode and Boost, both are not abbreviations AFAIK.
(so I do have UNICODE and _UNICODE in the project settings)
Wait a second, these only affect the win32 API: it switches TCHAR from char to wchar_t and in no way whatsoever affects boost (at least it shouldn't)! You have the same extent of Unicode support in both modes.
and release build is OK but in debug I have the errors LIBCMTD.lib(_wctype.obj) : error LNK2005: _iswalpha already defined in libboost_regex-vc6-mt-sgd-1_32.lib(c_regex_traits.obj)
Okay, if memory doesn't fail me, the 's' in '..-sgd-..' means static, but you aren't linking statically, right? This might mean that the dynamic link detection of boost's autolinking fails, did you #define _DLL anywhere?
I found the workaraund at http://aspn.activestate.com/ASPN/Mail/Message/2509074 but it doesn't work for me
Hmmm, if I understand that right, it simply doesn't inline some calls in debug mode, which is a known issue. I have two ideas here, you could use __inline or __forceinline (I forgot the exact name) for the compilation of the boost lib or you could tell the linker to ignore the additional definitions. BTW: this might have been more suitable for the users' mailinglist, but I'm not sure. Uli

I found the workaraund at http://aspn.activestate.com/ASPN/Mail/Message/2509074 but it doesn't work for me
Could some one please help me on this.... MSVC6.0 SP6, Window XP with the latest MS SDK. Thanks in advance, Alex.
This has been reported a couple of times, but no one has ever come up with a test case that I can reproduce, I found this: http://www.unixwiz.net/archives/2004/11/ which looks like it may be a solution, but whatever the problem is, it's of Microsoft's making and not ours. Hoping this helps, John.
participants (3)
-
Alexander Balaev
-
John Maddock
-
Ulrich Eckhardt