OSGEphemeris中的构建错误

Building Error in OSGEphemeris

本文关键字:错误 构建 OSGEphemeris      更新时间:2023-10-16

我正在尝试构建OSGEphemeris。我从中签出了源代码https://code.google.com/p/osgephemeris/source/checkout并将其与OSG 3.2.0链接。但它给出了类似-的编译错误

错误C2784:'bool std::operator<(const std::list<_Ty,_Ax>&,const std::list&llt;_Ty;_Ax>&)':无法推导"const std:list&lgt;"的模板参数_Ty,_Ax>&'来自"const std::string">

错误C2784:'bool std::operator<(const std::list<_Ty,_Ax>&,const std::list&llt;_Ty;_Ax>&)':无法推导"const std:list&lgt;"的模板参数_Ty,_Ax>&'来自"const std::string">

错误C2784:'bool std::operator<(const std::_Tree<_Traits>&,const std::_Tree<_Traits>&)":无法推导"const std::_Tree&lt_特征>&'来自"const std::string">

错误C2664:"osgEphemeris::StarField::_parseStream":无法将参数1从"int"转换为"std::istream&">

等等。我没有更改源代码中的任何内容。我怎样才能让它工作??提前感谢

我已经解决了这个问题。问题是osgDB有自己的基于std::String的String类,而osgText有自己的fstream类。两者都定义在与标准库标头同名的标头中。因此,通过从visualstudio的附加include目录中删除这些头文件,问题得到了解决。如果有人面临同样的问题,也许这会有所帮助。