diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index 7aa7a127a..2d05fbc55 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -2,6 +2,12 @@ #include +#ifdef _WIN32 +# undef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +#endif + namespace Debug { #ifdef _WIN32 diff --git a/components/debug/debugging.hpp b/components/debug/debugging.hpp index bf9fbd38c..81b01d055 100644 --- a/components/debug/debugging.hpp +++ b/components/debug/debugging.hpp @@ -10,6 +10,12 @@ #include "debuglog.hpp" +#if defined _WIN32 && defined _DEBUG +# undef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include +#endif + namespace Debug { // ANSI colors for terminal @@ -47,11 +53,7 @@ namespace Debug bool attachParentConsole(); #endif -#if defined(_WIN32) && defined(_DEBUG) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif // !WIN32_LEAN_AND_MEAN -#include +#if defined _WIN32 && defined _DEBUG class DebugOutput : public DebugOutputBase { public: