It prints many errors like the following:
4>serv.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>locbased.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>servnotf.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
4>unistr_cnv.obj : error LNK2005: "public: static int const
icu_4_2::StringPiece::npos" (?npos@StringPiece@icu_4_2@@2HB) already
defined in stringpiece.obj
Random fact in case they're related:
- Windows 7, VS 2008, build last worked maybe a week or two ago.
- My include.gypi is
{
'variables': {
'msvs_multi_core_compile': 1,
'component': 'shared_library'
}
}
-Scott
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>
-Scott
ICU's stringpiece contains the following:
/* Microsft Visual Studios <= 8.0 complains about redefinition of this
* static const class variable. However, the C++ standard states that this
* definition is correct. Perhaps there is a bug in the Microsoft compiler.
* This is not an issue on any other compilers (that we know of) including
* Visual Studios 9.0.
* Cygwin with MSVC 9.0 also complains here about redefinition.
*/
#if (!defined(_MSC_VER) || (_MSC_VER >= 1500)) && !defined(CYGWINMSVC)
const int32_t StringPiece::npos;
#endif
Visual Studio 2008 has _MSC_VER == 1500, which makes this line be
included, but removing the line fixes the problem. As does adjusting
the test from >= to simply >.
So now my question is: how does this work for other people? Is anyone
else using the components build on VS2008?
On Wed, Aug 4, 2010 at 2:13 PM, Evan Martin <ev...@chromium.org> wrote: