Problem with packaging of MSVC (C4668, C4067, C4996)

Nizami_Nz
Sat, 26 Apr 2025 20:57:10 +0000
Programming & Scripting

Continuing the discussion from Can't compile 5.4 Projects anymore, I need help.:

Can't compile 5.4 Projects anymore, I need help.

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.

For those who are looking for an answer!

The solutions above were partially correct:

1. Open file in your project (ProjectFolder → Source → project.target.cs)
and change (DefaultBuildSettings = BuildSettingsVersion.V2) to (DefaultBuildSettings = BuildSettingsVersion.Latest;)

2. Open file in folder (AppData\Roaming\Unreal Engine\UnrealBuildTool) and change code with new version:

Code:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
    <WindowsPlatform>
        <CompilerVersion>14.38.33130</CompilerVersion>
    </WindowsPlatform>
</Configuration>

Important, when I first changed the file to new version, I got an error that there was no such version (MSVC).

But (Unreal Engine) also wrote what version is present in (Visual studio), so I just changed the version in code to the one that was already on the computer.

Done!

1 post - 1 participant