cstream.h compile error in VSTGUI 4.3 on Windows

On Windows, using VSTGUI 4.3, I am getting a compiler error in cstream.h, on this line (line 45):

static const uint32_t kStreamIOError = std::numeric_limits<uint32_t>::max ();

The error is that in “max ()”, the “(” is an invalid token. How can I fix this? It compiles fine on the Mac in Xcode.

Visual Studio headers like to define a “max” macro. You always have to
#ifndef NOMINMAX
#define NOMINMAX
bevor including Windows.h