I think it is up to sequence to include.
In my case, including Windows.h before including SocketSubsystem.h I saw same issue.
So, I tried to make them correct sequence, Including SocketSubsystem.h early.
I solved that issue by Rearrangement.
如果你的项目中包含 include <windows.h>
其中定义了一些宏,会和Unreal定义的跨平台宏起冲突
这时你可以用Unreal中的 include “AllowWindowsPlatformTypes.h” include <windows.h> include “HideWindowsPlatformTypes.h”
这样一个形式将此包裹,就可以编译通过了