Loading ...
Sorry, an error occurred while loading the content.

Regex++ link problem with VC6 when building with _UNICODE defined

Expand Messages
  • Edward Diener
    If I build boost 1.28 regex with _UNICODE defined and then attempt to link the static mssd.lib version with a _UNICODE application using the library, I get:
    Message 1 of 2 , Aug 5, 2002
    • 0 Attachment
      If I build boost 1.28 regex with _UNICODE defined and then attempt to link
      the static mssd.lib version with a _UNICODE application using the library, I
      get:

      boost_regex_vc6_mssd.lib(w32_regex_traits.obj) : error LNK2005: _iswspace
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswalpha
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswupper
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswlower
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswdigit
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswxdigit
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswspace
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswpunct
      already defined in libcmtd.lib(_wctype.obj)
      boost_regex_vc6_mssd.lib(c_regex_traits.obj) : error LNK2005: _iswcntrl
      already defined in libcmtd.lib(_wctype.obj)
      Debug/TestRegularExpressionGUIStatic.exe : fatal error LNK1169: one or more
      multiply defined symbols found
      Error executing link.exe.

      This only occurs in the debug multi-threaded static library version.

      Has anyone else seen this or know why it might occur ?

      If I change the build options for this library from /Od /Gz to /O2,
      everything works fine and no linker errors occur.
    • John Maddock
      ... I ... It s a bug in VC6 - the wide character API s are defined as inlines in the headers, as well as in the C lib, when you turn on inline expansion the
      Message 2 of 2 , Aug 7, 2002
      • 0 Attachment
        > If I build boost 1.28 regex with _UNICODE defined and then attempt to link
        > the static mssd.lib version with a _UNICODE application using the library,
        I
        > get:

        It's a bug in VC6 - the wide character API's are defined as inlines in the
        headers, as well as in the C lib, when you turn on inline expansion the
        out-of-line inline defs go away and so do the duplicate definition errors.
        I don't know of any fix I'm afraid.

        John Maddock
        http://ourworld.compuserve.com/homepages/john_maddock/index.htm
      Your message has been successfully submitted and would be delivered to recipients shortly.