2

I'm using cocos2d-x library. cocos2d-x has tinyxml2 lib.

But tinyxml2::XMLDocument is in conflict with ms's XMLDocument in msxml.

I use tinyxml2::XMLDocument as this code:

tinyxml2::XMLDocument Doc;

but in virtual studio 2010, i get the error c2371 like this:

c:\program files\microsoft sdks\windows\v7.0a\include\msxml.h(9800): error C2371: “XMLDocument”:redefinition.
mpromonet
  • 11,326
  • 43
  • 62
  • 91

1 Answers1

1

I know it's not ideal, I had the same problem and was able to hack around it by renaming tinyxml2's XMLDocument to TinyXMLDocument. This assumes you have the source and are building it into your project as opposed to using a pre-compiled library.

Lambage
  • 367
  • 3
  • 8