查看: 1479|回复: 2

转载--osgOcean VC9.0 --"error C3767: '<'candidate function(s) 错误

[复制链接]

该用户从未签到

发表于 2013-4-3 10:59:38 | 显示全部楼层 |阅读模式
本帖最后由 CWorld 于 2013-4-3 11:01 编辑

现象:

   使用VC9.0 编译osgOcean, 产生如下错误:
  "error C3767: '<': candidate function(s) not accessible" , "error C2784: 'bool std:perator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string'" etc..,

具体原因:
   In the osgOcean project settings, the additional include directories includes the osg header directories, including osgDB and osgText. These are put there by CMake, which demands those paths in order to generate the project files.

osgText has its own String class based on std::string and osgDB has it's own fstream. Both are defined in headers with the same name as the standard library headers. So when osgOcean tries to include the standard varieties, it gets these overridden files.

By removing those two directories from the additional includes, osgOcean builds correctly.

转载地址:
   http://forum.openscenegraph.org/viewtopic.php?t=3422

该用户从未签到

发表于 2013-4-3 11:07:45 | 显示全部楼层

该用户从未签到

发表于 2015-1-16 14:59:07 | 显示全部楼层
我使用楼主的方法osgDB和osgText的include去掉了,确实编译通过,但是运行osgOcean的例子时,只显示水面,没显示天空,提示没有加载sky,没有插件,是什么原因呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表