'Rectangle' : ambiguous symbol

define NOGDI before any Windows headers:

#if defined(_MSC_VER)

#define NOGDI
#include <windows.h>
#include <WinBase.h>
#include <atomic>

#endif

You can also define WIN32_LEAN_AND_MEAN after defining NOGDI (if that’ll work for you).

Rail

3 Likes