Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2009, 1:24:15 PM (15 years ago)
Author:
rgrieder
Message:

Minimising problems when including windows.h because it defines macros like "min" and "max" if not explicitly specified.
There are two headers we use that include windows.h: OgreWindowEventUtilities.h and enet.h. I had to tweak a little bit there as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/pch/havepch/OrxonoxStableHeaders.h

    r2710 r2756  
    4545#  define WIN32_LEAN_AND_MEAN
    4646#endif
     47#define NOMINMAX // required to stop windows.h screwing up std::min definition
    4748#include <Ogre.h>
    4849#include <CEGUI.h>
     
    5758#include <tinyxml/ticpp.h>
    5859#include <tolua++.h>
    59 
    60 //Get around Windows hackery (windows.h is included by Ogre.h)
    61 #ifdef ORXONOX_PLATFORM_WINDOWS
    62 #  ifdef max
    63 #    undef max
    64 #  endif
    65 #  ifdef min
    66 #    undef min
    67 #  endif
    68 #endif
    6960
    7061//----------- Our files ----------
Note: See TracChangeset for help on using the changeset viewer.