Page 1 of 1

cstream.h compile error in VSTGUI 4.3 on Windows

Posted: Tue Dec 27, 2016 7:06 pm
by howardantares
On Windows, using VSTGUI 4.3, I am getting a compiler error in cstream.h, on this line (line 45):

Code: Select all

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.

Re: cstream.h compile error in VSTGUI 4.3 on Windows

Posted: Tue Dec 27, 2016 7:53 pm
by Arne Scheffler
Hi,
Visual Studio headers like to define a "max" macro. You always have to
#ifndef NOMINMAX
#define NOMINMAX
#endif
bevor including Windows.h

cheers
Arne