[UE4]VS2017(15.3)编译引擎代码错误:error C2187 syntax error 'identifier' was unexpected here
keywords: [UE4]VS2017(15.3)编译引擎代码错误:error C2187 syntax error ‘identifier’ was unexpected here
错误信息:
D:\Program_Filesx86\Windows Kits\8.1\include\um\combaseapi.h(229): error C2187: syntax error: 'identifier' was unexpected here
报错的代码位置:c:\Program Filesx86\Windows Kits\8.1\Include\um\combaseapi.h
extern "C++"
{
template<typename T> _Post_equal_to_(pp) _Post_satisfies_(return == pp) void** IID_PPV_ARGS_Helper(T** pp)
{
#pragma prefast(suppress: 6269, "Tool issue with unused static_cast")
static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
return reinterpret_cast<void**>(pp);
}
}
原因:VS2017 15.3版本的bug。
解决办法:把下面这个代码补丁加入你们引擎代码中。估计4.17.2版本就会把这个补丁合进来。 https://github.com/EpicGames/UnrealEngine/commit/4f48ef53ed646a22532e8e981f5515c94f303932
参考自:
https://answers.unrealengine.com/questions/688112/ue417-will-not-compile-with-new-153-update.html
寂寞凭高念远,向南楼、一声归雁。—陈亮《水龙吟》