HI Judson,

Standard library includes do seem to have been tightened up to varying
degrees across various degrees across C++11 compiler, previously we got
more stuff included incidentally when you included other headers.

The solution I opted for for Glyph.cpp was to use osg::maximum rather than
std::max, I did this rather than adding the extra include<algorithm> as the
rest of osgText uses osg::minimum and osg::maximum rather than the std::min
and std::max counterparts.  This fix is checked into the OSG-3.2 branch and
svn/trunk.

Robert.


On 20 November 2013 00:36, Judson Weissert <[email protected]> wrote:

> Hello,
>
> I was wondering if anyone has compiled OSG on Visual Studio 2013 yet? I am
> compiling OSG 3.2.1 on Visual Studio 2013, and encountered a build error in
> src/osgText/Glyph.cpp. It appears that std::min() and std::max() are not
> defined because the algorithm header was not included.
>
> See bullet point: "You must use #include <algorithm> when you call
> std::min() or std::max()." from
> http://msdn.microsoft.com/en-us/library/vstudio/bb531344.
> aspx#sectionToggle2
>
> I imagine this is some sort of C++2011 conformance issue.
>
> As far as I can tell, the solution is to simply include <algorithm> within
> Glyph.cpp. Granted, I have not figured out where the definitions were
> coming from previously...
>
> Regards,
>
> Judson
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to