Skip to content

Commit

Permalink
Unity build fails with MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Oct 14, 2018
1 parent 8231b40 commit a279c60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/TGUI/Widgets/MessageBox.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <TGUI/Widgets/ChildWindow.hpp>
#include <TGUI/Renderers/MessageBoxRenderer.hpp>

#undef MessageBox // Windows.h defines MessageBox when NOMB isn't defined before including Windows.h

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace tgui
Expand Down
4 changes: 3 additions & 1 deletion src/TGUI/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
#include <cassert>

#ifdef SFML_SYSTEM_WINDOWS
#ifndef NOMINMAX // MinGW already defines this which causes a warning without this check
#define NOMINMAX
#endif
#define NOMB
#define NOMINMAX
#define VC_EXTRALEAN
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
Expand Down

0 comments on commit a279c60

Please sign in to comment.