Can't compile engine: 'typeinfo.h' no such file or directory

Hello. I’m a bit desperate since i’ve tried everything and there’s really not info at all about this error on internet. I have installed everything related to .NET framework, Windows 10 SDK and MSVC on the Visual Studio Installer, and I keep getting this error every time I build the source code:

Can’t open include file: ‘typeinfo.h’: No such file or directory

Please I need some guidance because I just can’t find any solution, and I’ve read a couple topics on internet about this and all they say are “install MSVC” and “install .NET”

Having same issue while compiling unreal engine source

This is a breaking change in v14.23 toolset which is discussed here
Use v14.22 instead, it compiles well with it

Need help please

Uninstalled the v14.23 toolchain and installed the v14.22. But for some reason VS tries to still build with v14.23 which causes everything to fail. Can you be more clear on exactly how we are to use v14.22 instead?

Try the answer from TehnoMag here https://answers.unrealengine.com/questions/924915/view.html

As another user has mentioned, this issue happens when you have the latest MSVC toolset installed. At the time of this answer, the newest versoin is v14.23. Starting with this version and in future versions, typeinfo.h will be replaced with simply typeinfo. So if you are using a version of MSVC greater than 14.22, then just go to your PSAllocator.h file and change typeinfo.h to typeinfo. So in Unreal Engine version 4.23.0, file PsAllocator.h lines 38-44, here is what they would look like before:

#if(PX_WINDOWS_FAMILY || PX_XBOXONE)
#include <exception>
#include <typeinfo.h>
#endif
#if(PX_APPLE_FAMILY)
#include <typeinfo>
#endif

And here is what they would look like after

#if(PX_WINDOWS_FAMILY || PX_XBOXONE)
#include <exception>
#include <typeinfo>
#endif
#if(PX_APPLE_FAMILY)
#include <typeinfo>
#endif

This issue has been addressed by Unreal Engine in this pull request, https://github.com/EpicGames/UnrealEngine/pull/6226, and will be fixed in the next update.