Keywords: UE4, VS 2019 building from source failed

VS 2019

fatal error C1083 Cannot open include file ‘typeinfo.h’

Issue:
Building from engine source failed:

fatal error C1083: Cannot open include file: 'typeinfo.h': No such file or directory

Caused by:
It’s a issue of version 4.22.
https://issues.unrealengine.com/issue/UE-81677

Solution:
replace #include <typeinfo.h> with #include <typeinfo>, no .h.

error C4800: Implicit conversion from ‘ADODB::_Recordset *const ' to bool. Possible information loss

Error on building source:

error C4800: Implicit conversion from 'ADODB::_Recordset *const ' to bool. Possible information loss

error C4800: Implicit conversion from 'EnvDTE::Thread *const ' to bool. Possible information loss

Caused by:
Type checking at compilation time is more strict in VS 2019.

Solution:
Add Arguments.Add("/wd4800"); in Engine\Source\Programs\UnrealBuildTool\Platform\Windows\VCToolChain.cs.

void AppendCLArguments_CPP(CppCompileEnvironment CompileEnvironment, List<string> Arguments)
{
    if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang)
    {
        // Explicitly compile the file as C++.
        Arguments.Add("/TP");
        Arguments.Add("/wd4800");

Reference:
https://stackoverflow.com/questions/60943495/error-compiling-unreal-engine-4-24-1-after-updating-visual-studio-2019
https://blog.csdn.net/maxiaosheng521/article/details/95196841

Or:
Modify engine source:
https://github.com/EpicGames/UnrealEngine/commit/25cefc81fe24c767eb995b0bb66b5611e0596973?diff=unified

Reference:
https://forums.unrealengine.com/development-discussion/engine-source-github/1602477-c4800-implicit-conversion-from-t-to-bool-compile-error-when-using-vs2019


Man is the cruelest animal. ― Friedrich Nietzsche