[Solved] Fix complation error in Visual Studio 2013

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

JKnife
Just popping in
Just popping in
Posts: 1
Joined: Wed Jan 08, 2014 15:01

[Solved] Fix complation error in Visual Studio 2013

Postby JKnife » Wed Jan 08, 2014 15:06

In Visual Studio 2013 std:min and std:max got moved to the algorithm header.

So in Base.h above (around line 97)

Code: Select all

// The following defines macros used within CEGUI for std::min/std::max
// usage, and is done as a compatibility measure for VC6 with native STL.
#if defined(_MSC_VER) && (_MSC_VER <= 1200) && !defined(_STLPORT_VERSION)
#    define ceguimin   std::_cpp_min
#    define ceguimax   std::_cpp_max
#else
#    define ceguimin   std::min
#    define ceguimax   std::max
#endif


You need to add

Code: Select all

// min/max is defined in algroithm in VS2013+
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
#    include <algorithm>
#endif

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Bug] Fix complation error in Visual Studio 2013

Postby Ident » Sun Jan 12, 2014 16:23

Thanks, i fixed it in all branches in the repository also therefore it will be in the next CEGUI release.

http://cegui.org.uk/mantis/view.php?id=1018
https://bitbucket.org/cegui/cegui/commi ... de54d11818
CrazyEddie: "I don't like GUIs"

colin.avrech
Just popping in
Just popping in
Posts: 1
Joined: Tue Jun 03, 2014 06:08

Re: [Solved] Fix complation error in Visual Studio 2013

Postby colin.avrech » Fri Jun 06, 2014 17:26

+1 Good catch JKnife.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: [Solved] Fix complation error in Visual Studio 2013

Postby Ident » Fri Jun 06, 2014 17:34

We are planning on the 0.8.4 release in the next days. It will be based on the the v0-8 branch and will contain this fix.
CrazyEddie: "I don't like GUIs"


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 13 guests