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.

Location:
code/trunk/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r2710 r2756  
    3232#include "OrxonoxPrereqs.h"
    3333#include <OgrePrerequisites.h>
     34#define NOMINMAX // required to stop windows.h screwing up std::min definition
    3435#include <OgreWindowEventUtilities.h>
    3536#include "core/GameState.h"
  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r2710 r2756  
    4949#    define WIN32_LEAN_AND_MEAN
    5050#  endif
     51#  define NOMINMAX // required to stop windows.h screwing up std::min definition
    5152#  include "windows.h"
    52 
    53    //Get around Windows hackery
    54 #  ifdef max
    55 #    undef max
    56 #  endif
    57 #  ifdef min
    58 #    undef min
    59 #  endif
    6053#endif
    6154
  • 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.