Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2009, 1:24:15 PM (16 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/gamestates
Files:
2 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
Note: See TracChangeset for help on using the changeset viewer.