C++ Setup - Errors with first compile

Hey, I’m Stuck at the UE5 C++ course, step 5.9 “Compiling a C++ Project”.

When I run the compiler, I get the error:

[1/8] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.Cpp20.InclOrderOldest.cpp
xxx\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4668: "__has_feature" ...
xxx\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4067: ...
xxx\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.

I don’t use the special starter kit project from the marketplace, like in the course but the default unreal third person project with starter content, you can select while creating a new project.

  • I installed Visual Studio Community 2022 V17.12.3 (with both gaming options - Unity and C++)
  • Installed .NET Core 3.1.*
  • I already tried to install different MSVC version - Source
  • I set the DefaultBuildSettings in <Project>.Target.cs to BuildSettingsVersion.Latest - Source

I’m a little out of ideas :-/ Do you guys know this issue?

1 Like

Which version of Unreal Engine are you using. Unreal Engine v5.1 and later use .NET 6 and all versions also require .NET 4.8 (they are different, they are both needed). Also note, installing a later version (7, 8 or 9) doesn’t also work and it has to be v6

You mentioned the MSVC - this should be 14.38 (anything newer won’t work)

I hope this helps.

Were you able to find a solution?

I did both these:

  1. Removed the latest MSVC and then installed the version as mentioned by @beegeedee I got this error:
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Traits\IsContiguousContainer.h(6): fatal error C1083: Cannot open include file: 'initializer_list': No such file or directory
  1. And then I ran it with both the latest MSVC and the 13.8 (installed as an individual component from the VS installer) I installed .NET framework version: 6.0.428 [C:\Program Files\dotnet\sdk] initially following the guide in the course.
Determining max actions to execute in parallel (14 physical cores, 20 logical cores)
  Executing up to 14 processes, one per physical core
Building 8 actions with 8 processes...
[1/8] Link UnrealEditor-DeathIsADream.dll cancelled
[2/8] Link UnrealEditor-DeathIsADream.lib cancelled
[3/8] WriteMetadata DeathIsADreamEditor.target cancelled
[4/8] Compile MovingPlatform.cpp cancelled
[5/8] Compile DeathIsADream.cpp cancelled
[6/8] Compile MovingPlatform.gen.cpp cancelled
[7/8] Compile SharedPCH.Engine.ShadowErrors.InclOrderUnreal5_0.cpp
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(29): error C4668: '__has_feature' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(29): error C4067: unexpected tokens following preprocessor directive - expected a newline
[8/8] Compile DeathIsADream.init.gen.cpp cancelled

@Guido If you are still stuck then I would suggest to ditch VS Code and just use VS, you can use this video as a guide:

I played around with some MSVC versions and suddenly it worked. Thank you guys!

1 Like

Privacy & Terms