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.

3 Likes

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!

3 Likes

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

Confirming that this fix worked for me on UE 5.3.2 and VS2022 Community 17.14 . It gross (Because we don’t distribute the binary in our source control) but it works.

Thanks a lot, that works for me!

Hi all,

I just wanted to share that the supported MSVC compiler version in UE 5.3 is

14.34.31933

https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.3-release-notes?application_version=5.3#platformsdkupgrades

If you are using the latest version instead of that one you will get this issue.

Manually bumping the version check in code is not advisable. By doing so it means you will be using a compiler version that was not validated with that version of UE, which might cause issues.

You can install specific compiler versions using the visual studio installer, in the individual components tab.

If you installed the recommended version and still can’t compile, let me know and I can check with the team.

1 Like

Just wanted to say thank you. This worked for my issue and helped me install Antilatency for camera tracking.

This helped, thank you

For this kind of problem, I think reinstalling is the best solution, because the log reports are all problems with Unreal Engine internal files.

If the above suggestions are ineffective, it may be caused by incompatible MSVC

Since this is a hit result, I thought I could share a solution as well. I had a project in v5.3.2 a while ago. Recently I’ve been working on v5.4.4 projects for about a year and came back to v5.3.2 for it to show the following error.

error C4668: ‘__has_feature’ is not defined as a preprocessor macro, replacing with ‘0’ for ‘#if/#elif’

My solution was to

  • Delete .vsconfig, ProjectName.sln files and .vs folder
  • right-click project > generate VS project files
  • open the ProjectName.sln file and look for this prompt
    image
  • Click install, and it should show you the required package needs to be installed.
  • install it and try compiling again

hopefully someone finds it helpful

Regards,
Wasabi


References
  1. Image Reference