While creating c++ projects in 5.0.3 I am getting this error. How do I fix it ?
The project could not be compiled. Would you like to open it in Visual Studio?
Running D:/GAS/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.exe Development Win64 -Project=“C:/Users/pranj/OneDrive/Desktop/MyProject/MyProject.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\pranj\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for MyProjectEditor (no existing makefile)
@progress push 5%
Parsing headers for MyProjectEditor
Running UnrealHeaderTool “C:\Users\pranj\OneDrive\Desktop\MyProject\MyProject.uproject” “C:\Users\pranj\OneDrive\Desktop\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -abslog=“C:\Users\pranj\AppData\Local\UnrealBuildTool\Log_UHT.txt” -installed
Reflection code generated for MyProjectEditor in 1.3302068 seconds
@progress pop
Building MyProjectEditor…
Using Visual Studio 2022 14.39.33521 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from MyProject unity file: MyProject.cpp, MyProjectCharacter.cpp, MyProjectGameMode.cpp
Determining max actions to execute in parallel (8 physical cores, 16 logical cores)
Executing up to 8 processes, one per physical core
Requested 1.5 GB free memory per action, 8.45 GB available: limiting max parallel actions to 5
Building 11 actions with 5 processes…
[1/11] Resource Default.rc2
[2/11] Compile SharedPCH.Engine.ShadowErrors.cpp
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): error C2440: ‘’: cannot convert from ‘const From *’ to ‘TStringConversion<TStringConvert<From,To>,128>’
with
[
From=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion’: no overloaded function could convert all the argument types
with
[
From=TCHAR,
To=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(689): note: could be ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const StringConv::FUnused *)’
with
[
From=TCHAR,
To=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const StringConv::FUnused *)’: cannot convert argument 1 from ‘const From *’ to ‘const StringConv::FUnused *’
with
[
From=TCHAR,
To=ANSICHAR
]
and
[
From=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(737): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(FromRangeType &&)’
with
[
From=TCHAR,
To=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(698): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const SrcBufferType *,int32)’
with
[
From=TCHAR,
To=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(677): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const SrcBufferType *)’
with
[
From=TCHAR,
To=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: while trying to match the argument list ‘(const From *)’
with
[
From=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: the template instantiation context (the oldest one first) is
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Misc\SecureHash.h(75): note: see reference to function template instantiation ‘auto StringCast<ANSICHAR,128,TCHAR>(const From *)’ being compiled
with
[
From=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): error C2440: ‘’: cannot convert from ‘const From *’ to ‘TStringConversion<TStringConvert<From,To>,128>’
with
[
From=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion’: no overloaded function could convert all the argument types
with
[
From=ANSICHAR,
To=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(689): note: could be ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const StringConv::FUnused *)’
with
[
From=ANSICHAR,
To=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const StringConv::FUnused *)’: cannot convert argument 1 from ‘const From *’ to ‘const StringConv::FUnused *’
with
[
From=ANSICHAR,
To=TCHAR
]
and
[
From=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(737): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(FromRangeType &&)’
with
[
From=ANSICHAR,
To=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(698): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const SrcBufferType *,int32)’
with
[
From=ANSICHAR,
To=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(677): note: or ‘TStringConversion<TStringConvert<From,To>,128>::TStringConversion(const SrcBufferType *)’
with
[
From=ANSICHAR,
To=TCHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: while trying to match the argument list ‘(const From *)’
with
[
From=ANSICHAR
]
D:\GAS\UE_5.0\Engine\Source\Runtime\Core\Public\Containers\StringConv.h(1048): note: the template instantiation context (the oldest one first) is
D:\GAS\UE_5.0\Engine\Source\Runtime\TypedElementFramework\Public\Elements\Framework\TypedElementData.h(64): note: see reference to function template instantiation ‘auto StringCast<TCHAR,128,ANSICHAR>(const From *)’ being compiled
with
[
From=ANSICHAR
]