查看: 3757|回复: 9

新手请教大牛osgearth编译问题,不胜感激!

[复制链接]

该用户从未签到

发表于 2012-3-10 01:46:22 | 显示全部楼层 |阅读模式
按照本版提供的教程
准备了以下内容:
curl-7.24.0.tar.gz
expat-win32bin-2.0.1.rar
gdal190.zip
geos-3.2.3.tar.bz2
libzip-windows.zip
OpenSceneGraph-3.0.1.zip
gwaldron-osgearth-osgearth-2.1.1
使用vs2005编译,osg编译没有问题,但是在编译osgearth时出现下列问题,搞了一天不知道什么问题


1>D:\OSG0308\osgearth\src\osgEarth/Config(431) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify:perator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(436) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(441) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(441) : error C2660: 'osgEarth::Config::update' : function does not take 2 arguments
1>D:\OSG0308\osgearth\src\osgEarth/Config(446) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(446) : error C2660: 'osgEarth::Config::update' : function does not take 2 arguments
1>Viewpoint.cpp
1>D:\OSG0308\osgearth\src\osgEarth/Config(431) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(436) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(441) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(441) : error C2660: 'osgEarth::Config::update' : function does not take 2 arguments
1>D:\OSG0308\osgearth\src\osgEarth/Config(446) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1>        D:\OSG0308\osgearth\src\osgEarth/StringUtils(177): could be 'osgEarth::Stringify &osgEarth::Stringify::operator <<(const osgEarth::Stringify &)'
1>        while trying to match the argument list '(osgEarth::Stringify, overloaded-function)'
1>D:\OSG0308\osgearth\src\osgEarth/Config(446) : error C2660: 'osgEarth::Config::update' : function does not take 2 arguments

是不是我vs2005配置有问题,还是版本有问题,谢谢

该用户从未签到

发表于 2012-3-18 22:23:06 | 显示全部楼层
是不是osg 应该用 developer realease!!??

该用户从未签到

发表于 2012-3-18 22:24:03 | 显示全部楼层
因为我以前编译VPB时候,就得用developer release@@!感觉!!不知道对不!!

该用户从未签到

发表于 2012-7-13 21:19:16 | 显示全部楼层
我在VS2005下编译也遇到了这个问题,但在VS2010时却没有这个问题。我试了一下可以这样解决:
在StringUtils文件的Stringify结构体中加入以下语句重新编译即可:

Stringify& operator << (std::ios_base& (__cdecl *_Pfn)(std::ios_base&))
{ buf<<_Pfn; return (*this);}

该用户从未签到

发表于 2012-7-24 12:49:53 | 显示全部楼层
你把gdal 和geos也同时编译就可以了,我也遇到一样的问题,编译后就没有了

该用户从未签到

发表于 2012-7-24 19:07:47 | 显示全部楼层
我编译是出现1000多个错误,现在我基本丧失信心!

该用户从未签到

发表于 2012-7-24 19:32:19 | 显示全部楼层
skq5714 发表于 2012-7-24 19:07
我编译是出现1000多个错误,现在我基本丧失信心!

编译确实比较麻烦,如果不需要修改源代码,你可以使用编译好的包
vc10编译的osg3.01+osgEarth2.2下载地址:
http://115.com/file/an01d9l4

该用户从未签到

发表于 2012-7-25 13:01:23 | 显示全部楼层
ago 发表于 2012-7-24 19:32
编译确实比较麻烦,如果不需要修改源代码,你可以使用编译好的包
vc10编译的osg3.01+osgEarth2.2下载地址 ...

谢谢,不过我用的是vs2008啊……
  • TA的每日心情
    开心
    2023-10-26 21:41
  • 签到天数: 5 天

    [LV.2]偶尔看看I

    发表于 2012-8-17 23:09:15 | 显示全部楼层
    skq5714 发表于 2012-7-25 13:01
    谢谢,不过我用的是vs2008啊……

    关键不在于使用VS的版本,而是找对对应库的版本
    qGis的编译比这痛苦多了,对各个依赖库的版本都有要求,太高不行,低也不行,不过只要编译过qGis的,编译OSG相关的还是容易多了, 本人编译的时候曾经参照本论坛的资料 + 曾经在编译qGis时使用的gdal等库,我是用VS2008编译的OSG3.0、OSGEarth2.1、VPB等

    该用户从未签到

    发表于 2013-1-28 15:05:50 | 显示全部楼层
    很有帮助啊
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

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

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

    联系我们

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