Can we allow WIN32_LEAN_AND_MEAN as a valid preprocessor macro for Windows extension?

I tried to add WIN32_LEAN_AND_MEAN as a preprocessor macro for Windows extension, but seems it is not allowed.

By default, Windows.h includes WinSock.h, which cannot co-exists with WinSock2.h, please see this link for more detail.

Macro WIN32_LEAN_AND_MEAN will make Windows.h exclude WinSock.h, (please see this link for more detail).

I need this macro badly becuase I need to include WinSock2.h in my extension.

1 Like

You should be able to add defines by adding:

defines:    ["WIN32_LEAN_AND_MEAN"]
3 Likes

It works, thanks @Mathias_Westerdahl !

2 Likes