It happened the same to me, the problem was because I was including an external library (boost), and the header file I was using was including windows.h so I fix it including the unreal windows headers
#include "AllowWindowsPlatformTypes.h"
//The external headers and defines goes here
#include "HideWindowsPlatformTypes.h"