Please Help!! when i create a C++ project in UE5.3.2 but I create a project it gives me this error message!

I am using UE5.3.2. When creating a C++ Project, it shows a Compiler Error:

Running C:/Program Files/Epic Games/UE_5.3/Engine/Build/BatchFiles/Build.bat Development Win64 -Project=“C:/D/UE_Project/UEM4U/UEM4U.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet “…\Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll” Development Win64 -Project=“C:/D/UE_Project/UEM4U/UEM4U.uproject” -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\001939\AppData\Local\UnrealBuildTool\Log.txt
Creating makefile for UEM4UEditor (no existing makefile)
@progress push 5%
Parsing headers for UEM4UEditor
Running Internal UnrealHeaderTool C:\D\UE_Project\UEM4U\UEM4U.uproject C:\D\UE_Project\UEM4U\Intermediate\Build\Win64\UEM4UEditor\Development\UEM4UEditor.uhtmanifest -WarningsAsErrors -installed
Total of 0 written
Reflection code generated for UEM4UEditor in 1.4095625 seconds
@progress pop
Building UEM4UEditor…
Using Visual Studio 2022 14.42.34436 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.42.34433) and Windows 10.0.22621.0 SDK (C:\Program Files (x66)\Windows Kits\10).
Determining max actions to execute in parallel (10 physical cores, 12 logical cores)
Executing up to 10 processes, one per physical core
------ Building 6 action(s) started ------
[1/6] Resource Default.rc2
C:/Users/001939/AppData/Local/UnrealEngine/Common/DerivedDataCache: Maintenance finished in +00:00:00.474 and deleted 0 files with total size 0 MiB and 0 empty folders. Scanned 956 files in 1613 folders with total size 21 MiB.
[2/6] Compile [x64] SharedPCH.Engine.Cpp20.cpp
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4668: ‘__has_feature’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4067: unexpected tokens following preprocessor directive - expected a newline
C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Engine\Classes\Engine\SkeletalMesh.h(799): warning C4996: ‘FBoneMirrorInfo’: FBoneMirrorInfo is deprecated. Please use UMirrorDataTable for mirroring support. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.

I am using Visual Studio 2022 17.12.4 and MSVC 14.42.34436, and I selected Windows 11 SDK 10.0.22621.0. I don’t know what I installed incorrectly, and I only have Visual Studio 2022 on my machine.

1 Like

BUMP! I followed the “Setting Up Visual Studio” from Epic Games website and I’m having the same issue. I hope this question get answered soon.

Hi there,

I encountered a similar issue with the combination of UE5.3.2 and Visual Studio 2022 (version 17.12.4), and here’s how I resolved it:

  1. Updating WindowsPlatformCompilerSetup.h:
    The error related to the compiler version detection can be fixed by updating the version check.
  • Navigate to Engine\Source\Runtime\Core\Public\Windows\WindowsPlatformCompilerSetup.h.
  • Open the file in a text editor (ensure the file is not marked as read-only).
  • Locate this line:
#if defined(_MSC_VER) && _MSC_VER > 1939
  • Change 1939 to 1948:
#if defined(_MSC_VER) && _MSC_VER > 1948
  • Save the file and put it on read-only again. This should eliminate the warning about the compiler being newer than Visual Studio 2022.
  1. Fixing the __has_feature error:
    The second issue arises from a __has_feature directive in the header ConcurrentLinearAllocator.h, which causes a compiler error.
    To resolve it:
  • Navigate to Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h.
  • Find the line:
#elif __has_feature(address_sanitizer)
  • Replace it with:
#elif 0
  • This will bypass the __has_feature check and allow the build to proceed without cascading errors.

Hope this helps!

The WindowsPlatformCompilerSetup.h has bugged me for ages, how do you know that it is 1948, like where/how is that number defined?

Second of all, apparently you can also uninstall C++ Address Sanitizer via the VS Installer, but I don’t know if that is a safer way to deal with the ConcurrentLinearAllocator.h.

I couldn’t find the specific number through Google, so I tested a few values, and 1948 worked for me.
Regarding the C++ AddressSanitizer, I’m not entirely sure about its implications. I chose to let the Unreal Build Tool to bypass the issue in ConcurrentLinearAllocator.h. However, uninstalling the C++ AddressSanitizer might resolve the problem.

UGH THANK YOU