After including both protobuf 2.5 and irrlicht 3d engine I got the following compilation error:
...\irrlicht\trunk\source\protobuf-2.5.0rc1\src\google\protobuf\generated_message_util.h(71):
error C2872: 'string' : ambiguous symbol
could be 'c:\msdev2010\vc\include\xstring(2062) : std::basic_string<_Elem,_Traits,_Ax>
std::string'
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ax=std::allocator<char>
]
or
c:\projects\ultimatestrategy\irrlicht\include\irrstring.h(74) : irr::core::string
Now I realise that protobuf is causing the problem since they don't use complete symbol names, but rather use the directive using.
Question: What is the fastest way to get around fixing either or both libraries so they play nice together?
Note: Only reference I found on this problem: https://code.google.com/p/protobuf/issues/detail?id=544&q=ambiguous%20symbol&colspec=ID%20Type%20Status%20Priority%20FixedIn%20Owner%20Summary
Any help would be greatly appreciated.
I ended up replacing all string by std::string in google's code. I also replaced all map with std::map.
Unfortunately, this would need to be done each time the protobuf libraries are updated and is very impractical.