UE4.27 bug汇总

发布时间 2023-11-14 17:13:23作者: 一只小菜皮卡丘

编译时 error C4668: 没有将“_WIN32_WINNT_WIN10_TH2”定义为预处理器宏,用“0”替换“#if/#elif”

一般为Windows中的宏和UE4冲突所致,需要用如下头文件包裹冲突的头文件:

#include "Windows/AllowWindowsPlatformTypes.h"
#include "Windows/PreWindowsApi.h"
 
#include "冲突的头文件" // 这里把报错涉及的头文件加上,然后整段都加入`自己.h`文件中
 
#include "Windows/PostWindowsApi.h"
#include "Windows/HideWindowsPlatformTypes.h"