2013-12-08 18 views
3

既包括protobuf的2.5和Irrlicht的3D引擎後,我得到了下面的編譯錯誤:不明確的符號串protobuf的

...\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 

現在我認識到protobuf的原因造成的問題,因爲他們不使用完整的符號名,而是使用使用的指令

問題:解決一個或兩個庫問題的最快方法是什麼?

注:僅供參考我在這個問題上找到:https://code.google.com/p/protobuf/issues/detail?id=544&q=ambiguous%20symbol&colspec=ID%20Type%20Status%20Priority%20FixedIn%20Owner%20Summary

任何幫助將不勝感激。

+0

你可以嘗試把'包irr;'作爲proto文件的第一行並重新生成? – James

+0

不幸的不是。包只能在.proto定義文件中使用一次。 –

回答

2

我最終取代所有字符串std :: string在谷歌代碼。 我還全部替換了地圖std ::地圖

不幸的是,這需要在每次更新protobuf庫時完成,而且非常不切實際。