error: ...\Windows Kits\8.1\Include\um\combaseapi.h "IUnknown" is undefined 问题

链接:https://answers.unrealengine.com/questions/688112/ue417-will-not-compile-with-new-153-update.html


我用的是上述链接中的这种解决方案,不一定适用所有情况:在Windows Kits\8.1\Include\um\combaseapi.h文件中添加一行  interfaceI Unknown;


interfaceIUnknown;// ADD THIS LINE HERE

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

returnreinterpret_cast<void**>(pp);

}

}

你可能感兴趣的:(error)