So a while back I started getting this message from the engine whenever I tried creating a new project in unreal engine 5.4.
C:\Program Files\Epic Games\UE_5.4\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.4\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.4\Engine\Source\Runtime\Engine\Classes\Engine\SkeletalMesh.h(930): 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.
Total time in Parallel executor: 32.52 seconds
Total execution time: 52.64 seconds
I’m not sure what the message was about since it seemed to do with code I haven’t touched. This all started happening after I tried to update my tool chain (vs and rider). Fine. Maybe I messed that up. Fast forward after days of trying to get my set up back to a working state I decide to reinstall everything. (Rider VS and Unreal.) no dice. So I wipe my entire pc and reinstall everything. I thought for sure that would be the silver bullet since that would set me back to square one, but alas when I opened up UE5.4 this morning and tried to create a new project I got this message again.
I’m really at a loss here. I know it’s gonna be something silly like a check box I need to hit, but can someone please help me? I don’t know what to do anymore. I’ve tried asking chat, but it doesn’t give any helpful advice.
I think I figured it out. it was an issue with the visual studio components I’d downloaded . I was using the wrong MSVC version. I needed 14.38 but by default visual studios will try to give you latest version.
I think just downgrading MSVC to 14.38 is sufficient, if you update the build configuration xml file as indicated in this reply: UE5.3 cannot build project - #3 by villinx
@UnivexNate , open your visual studio 2022 and installed missed componentes, one windows will apeear suggestnig install uniinstalled components, so install and rebuild.
Since this is a hit on google, for anyone else looking, don’t bother with reinstalling modules and such.
Go to your project.target.cs file, usually in the source folder and get the file.
In it, set the DefaultBuildSettings = BuildSettingsVersion.Latest;
instead of V2, V3, V4, V5, etc.
I wasted over a day reinstalling VS 2022, MSVC and playing with a bunch of nonsense.
This will fix it.
If in Unreal Projects\ProjectName\Intermediate\Source\ProjectName.Target.cs you already have DefaultBuildSettings = BuildSettingsVersion.Latest;by default, then just install MSVC v143 v14.38 17.8 x64/x86 in Visual Studio Installer (you need to manually search for this - just copy and paste).
Not fully sure if the above solution of setting DefaultBuildSettings to the latest helped in my solution or not but I will note that I did add that setting to my GameName.Target.cs file.
The solution for me was going into Visual Studio installer, modifying my version to only use MSVC v143 - VS 2022 C++ x64/x86 build tools (v14.38-17.8) AND modifying my build configuration located at "%appdata%\Unreal Engine\UnrealBuildTool"
For some reason even though I only had MSVC v14.38 unreals build tool wasn’t trying to use said version so I explicitly added it to my buildconfiguration.xml (file contents below)
**Note: if generating sln throws an error afterwards like “Unable to find valid 14.38.32919 C++ toolchain for VisualStudio2022 x64” check what version you have installed.
Somewhere in that little unreal engine window that pops up when you generate sln file should mention what version you have installed.
Example, originally I thought installed version of MSVC v14.38.32919 was installed, but then I saw the above error**
Reading through sln error log I saw my version listed was * C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130
(Family=14.38.33130, FamilyRank=4, Version=14.38.33144, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
That’s how I verified my version
Sorry for a lot of info but that was my process and I want to leave as many details for anyone who comes across my specific issue.
The problem here is that visual studio installer forces me to download the latest version of MSVC by removing the unreal engine components for visual studio automatically if I remove the latest MSVC, and if I check them again it toggles the latest MSVC,
I found that very annoying and I really want help.
Perfect, I followed some of your answer and thanks god the problem gone, I checked both 14.38 and the latest MSVC versions, then I typed the code that you have provided in your answer about UnrealBuildTool, when I rebuild it the problem was solved and zero errors, thank you and thanks the replied @FyreNight,
Anyone face the same error you can follow down these steps:
If visual studio installerforces you to download the latest version of MSVC, don’t remove it instead toggle the needed version of MSVC “14.38.33144 in this case” then modify the BuildConfiguration.xml at %AppData%\Unreal Engine\UnrealBuildTool to have the compiler version set to 14.38.33144