UE4缺少typeinfo.h文件
我的blog:https://papalqi.cn/
#if(PX_WINDOWS_FAMILY || PX_XBOXONE)
#include <exception>
#include <typeinfo.h>
#endif
#if(PX_APPLE_FAMILY)
#include <typeinfo>
#endif
提示缺少<typeinfo.h>
可以按照这个来更新
https://developercommunity.visualstudio.com/content/problem/734566/msvc-142328019-is-missing-include-typeinfoh.html
也可以直接把这个单独的文件加到工具集里面
位置
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\
文件:
/***
*typeinfo.h - Defines the type_info structure and exceptions used for RTTI
*
* Copyright © Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the type_info structure and exceptions used for
* Runtime Type Identification.
*
* [Public]
*
****/
#pragma once
#include <typeinfo>
#if defined(__RTTI_OLDNAMES) && (!defined(_CRTBLD) || !defined(_TICORE))
// Synonyms for legacy code
using std::bad_cast;
using std::bad_typeid;
typedef type_info Type_info;
typedef bad_cast Bad_cast;
typedef bad_typeid Bad_typeid;
#endif /* __RTTI_OLDNAMES */
如果要真的替换工具集
在 BuildConfiguration.xml中替换
<?xml version="1.0" encoding="utf-8" ?> 14.22.27905在C盘的AppDataRoamingUnreal EngineUnrealBuildTool中增加
<?xml version="1.0" encoding="utf-8" ?> 14.22.27905