cstream.h compile error in VSTGUI 4.3 on Windows

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
howardantares
Posts: 128
Joined: Tue Jun 21, 2016 1:46 pm

cstream.h compile error in VSTGUI 4.3 on Windows

Post 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.

Arne Scheffler
Posts: 373
Joined: Mon Jun 20, 2016 7:53 am

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

Post 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

Post Reply