错误如下:
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