vs2010编译osg源码问题:error C2780
来源:互联网 发布:手机淘宝淘抢购 编辑:程序博客网 时间:2024/05/22 02:29
错误如下:
5>InitializeBuildStatus:
5> Creating "example_osgmultiplemovies.dir\Debug\Examples osgmultiplemovies.unsuccessfulbuild" because "AlwaysCreate" was specified.
5>CustomBuild:
5> All outputs are up-to-date.
5>ClCompile:
5> osgmultiplemovies.cpp
5>..\..\..\examples\osgmultiplemovies\osgmultiplemovies.cpp(654): error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
5> D:\Program Files\Microsoft Visual Studio 10.0\VC\include\xutility(2086) : see declaration of 'std::max'
5>..\..\..\examples\osgmultiplemovies\osgmultiplemovies.cpp(654): error C2782: 'const _Ty &std::max(const _Ty &,const _Ty &)' : template parameter '_Ty' is ambiguous
5> D:\Program Files\Microsoft Visual Studio 10.0\VC\include\xutility(2078) : see declaration of 'std::max'
5> could be 'double'
5> or 'float'
5>
5>Build FAILED.
解决办法:定位到出错文件osgmultiplemovies.cpp
将654行 unsigned int num_files_per_row = std::max(osg::round(sqrt(static_cast<float>(std::min(max_videos, static_cast<unsigned int>(files.size()))))), 1.0);
改为:unsigned int num_files_per_row = std::max(osg::round(sqrt(static_cast<float>(std::min(max_videos, static_cast<unsigned int>(files.size()))))),(static_cast<float> (1.0)));
重新编译 ok
参考:http://forum.openscenegraph.org/viewtopic.php?t=11325
- vs2010编译osg源码问题:error C2780
- OSG+QT5+vs2010编译
- OSG+QT5+vs2010编译
- OSG OSGearth vs2010编译
- osg vs2010 问题之一
- OSG+VS2010+WIN764位编译
- OSG源码编译
- osg源码编译步骤
- OSG源码编译
- VS2010中error C2780: const _Ty &std::max(const _Ty &,const _Ty &,_Pr)
- OSG编译问题
- OSG+VS2010+windowsxp安装和编译
- win7 + vs2010 + osg 编译安装过程
- 调用静态编译osg问题
- OSG在VS2010中使用的问题
- OSG+VS2010+win7环境搭建+OSGEARTH问题
- vs2010编译irrlicht源码
- vs2010编译live555源码
- qq,sina第3方登录js版
- INNODB 和 MYISAM 区别 事物处理
- Ubuntu eclipse :An error has occurred. See the log file
- The difference between the int value ++; and the value;
- C语言中printf格式化输出函数
- vs2010编译osg源码问题:error C2780
- mybatis学习整理(用户手册)(完整的全面学习)
- 在一个窗口应用程序中创建一个console窗口
- eclipse中Failed to install *.apk on device *: timeout的解决办法!!!
- C# MVC 自学笔记—5 添加模型
- QQ聊天记录如何加密
- 深入学习Django源码基础14 - Django中forms简要分析
- 提前载入贴图
- MYSQL的事务处理