# C++ Transition Guide for 5.4

**URL:** <https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 1, 2024, 11:36pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583 "2024-05-01T23:36:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 1, 2024, 11:36pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/1 "2024-05-01T23:36:54Z")

</div>

Dear Community,

Here is a thread where you can post any issues you are encountering while upgrading to UE 5.4!

❤ Yay for UE 5.4! ❤

Thank You ❤ Epic! ❤

**Release Notes**  
[https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes](https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5.4-release-notes)

* * *

**VS 2022 x64 Issues**

> [@"VisualStudioUnsupported x64 must be installed" trying to update a project from 5.3.2 to 5.4.1](https://forums.unrealengine.com/t/visualstudiounsupported-x64-must-be-installed-trying-to-update-a-project-from-5-3-2-to-5-4-1/1835116):
>
> Hi! I’ve just downloaded 5.4.1 and I’m receiving this strange error if I click “Switch Unreal Engine Version” in the right click menu: Running C:/Program Files/Epic Games/UE\_5.4/Engine/Build/BatchFiles/Build.bat -projectfiles -project="D:/\_Unreal/UnrealProjects/HOWL/HOWL.uproject" -game -rocket -progress -log="D:\_Unreal\UnrealProjects\HOWL/Saved/Logs/UnrealVersionSelector-2024.05.01-19.07.36.log" Using bundled DotNet SDK version: 6.0.302 Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\…

❤

Rama

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 1, 2024, 11:49pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/2 "2024-05-01T23:49:50Z")

</div>

## bStrictConformanceMode

“[ProjectName] modifies the values of properties: [bStrictConformanceMode]. This is not allowed, as [ProjectName] has build products in common with UnrealEditor.”

> [@BuildEnvironment = TargetBuildEnvironment.Unique](https://forums.unrealengine.com/t/buildenvironment-targetbuildenvironment-unique/1764271):
>
> I am testing 5.4.0 preview 1 from source. When compiling the project, I get an error about bStrictConformanceMode which has to do with the project changing/interfering the engines files (I don’t remember the exact error message). The log said to add BuildEnvironment = TargetBuildEnvironment.Unique; in the target. The project is now compiling, but this wasn’t needed in 5.3.2. Does anyone know why this change to the target was needed in 5.4? Since it is compiling, it is no big deal, I am just…

* * *

**Original**

```auto
using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponEditorTarget : TargetRules
{
	public PMeleeWeaponEditorTarget(TargetInfo Target) : base(Target)
	{
		        Type = TargetType.Editor;
                ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

**Solution ~~\> bOverrideBuildEnvironment = true**

```auto
using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponEditorTarget : TargetRules
{
	public PMeleeWeaponEditorTarget(TargetInfo Target) : base(Target)
	{
                bOverrideBuildEnvironment = true;
		         Type = TargetType.Editor;
                ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

❤

Rama

---

<div class="post-metadata">

**Author:** ![jswanson993](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jswanson993](https://forums.unrealengine.com/u/jswanson993)\
**Post date:** [May 2, 2024, 12:01am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/3 "2024-05-02T00:01:26Z")

</div>

I am having an issue with AutomationSpec Tests. When I try and load a test level using:

```auto
FAutomationEditorCommonUtils::LoadMap(TestWorldPath);

```

And I try to run my tests in the editor, before the map opens the engine crashes and in my IDE this error is printed in the logs:

> appError called: Assertion failed: !LevelList.Contains(TickTaskLevel) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp] [Line: 1458]

I was having a similar problem in 5.3.2 when my tests would try to reload the map I had open already, and I resolved by checking to see if that map was open already. Now it’s doing it regardless of what map is already loaded, but it’s also inconsistent and doesn’t happen every time.

This doesn’t seem to be a problem when I use the normal test workflow with the latent command `FEditorLoadMap(TestWorldPath)`

I tried stepping through to see if I could identify where it goes wrong but it didn’t shed any light.

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 2, 2024, 12:08am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/4 "2024-05-02T00:08:12Z")

</div>

## error C2248: ‘TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>::IndexSize’: cannot access private member

> [@UE5.4.0-preview-1: C2248 'TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>::IndexSize': cannot access private member declared in class 'TMemoryWriterBase\<TSizedDefaultAllocator\<32\>\>'](https://forums.unrealengine.com/t/ue5-4-0-preview-1-c2248-tmemorywriterbase-tsizeddefaultallocator-32-indexsize-cannot-access-private-member-declared-in-class-tmemorywriterbase-tsizeddefaultallocator-32/1774878/14):
>
> not very sure if this is a bug ,but epic tweaks some of the setting in each version,like cpp standards upgrades and code style check,they also mentioned that settings will cause some compile issues ,so just stick to their latest will make it easier grin

Original

```auto
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponTarget : TargetRules
{
	public PMeleeWeaponTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		bUsesSteam = true;
        ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

Solution ~~~\> DefaultBuildSettings = BuildSettingsVersion.Latest;

```auto
// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;
using System.Collections.Generic;

public class PMeleeWeaponTarget : TargetRules
{
	public PMeleeWeaponTarget(TargetInfo Target) : base(Target)
	{
        DefaultBuildSettings = BuildSettingsVersion.Latest;
		Type = TargetType.Game;
		bUsesSteam = true;
        ExtraModuleNames.Add("PMeleeWeapon");
    }
}

```

Make sure to include this line

` DefaultBuildSettings = BuildSettingsVersion.Latest;`

in

`[YourProject].target.cs`

and

`[YourProject]Editor.target.cs`

and perform a full Re-Build \<~~~

Also, make sure to remove any other values of DefaultBuildSettings, such as

`DefaultBuildSettings = BuildSettingsVersion.V2; <~~~ Remove`

❤

Rama

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 2, 2024, 12:22am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/5 "2024-05-02T00:22:40Z")

</div>

## FQuat Header

## error C2079: ‘`FMeleeSweepData::Rotation' uses undefined struct 'UE::Math::TQuat<double>`’

Solution:  
`#include "Math/Quat.h"`

* * *

FHitResult Moved From EngineTypes.h to HitResult.h

`#include "Engine/EngineTypes.h"`

Becomes

`#include "Engine/HitResult.h"`

❤

Rama

---

<div class="post-metadata">

**Author:** ![Sarlack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sarlack/32/1194542_2.png) [@Sarlack](https://forums.unrealengine.com/u/Sarlack)\
**Post date:** [May 2, 2024, 12:38am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/6 "2024-05-02T00:38:37Z")

</div>

@Rama

Do you know anything about chaos cloth?

Here is my original post

> [@Does anyone know how to clear these Chaos Cloth errors in 5.4](https://forums.unrealengine.com/t/does-anyone-know-how-to-clear-these-chaos-cloth-errors-in-5-4/1821745):
>
> I upgraded to 5.4 (Github Release) and these errors appear when starting the editor. I have the editor set to startup on an empty level. I switched all cloth simulations to the new Chaos Cloth plugins. Chaos cloth is working fine and the errors don’t seem to affect anything (that I know of, but 5.4 crashes sometimes and previous versions did not). The screenshot below shows the Chaos errors. The green dashes in the screenshot are what I’m talking about (I also have a warning about MDL SDK). …

---

<div class="post-metadata">

**Author:** ![VortexFX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VortexFX](https://forums.unrealengine.com/u/VortexFX)\
**Post date:** [May 5, 2024, 8:51am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/7 "2024-05-05T08:51:56Z")

</div>

Howdy,

Having issues building my game since the upgrade was working fine in the latest 5.3 but now im getting un unresolved external symbol which normally means there is a missing dependency. From what i can see however nothing has changed for this, from 5.3 to 5.4 its still part of the CoreUObject Module.

`Error : LNK2019: unresolved external symbol "__declspec(dllimport) public: class FString__cdecl FUniqueNetIdWrapper::ToString(void)const " (__imp_?ToString@FUniqueNetIdWrapper@@QEBA?AVFString@@XZ) referenced in function`

My Build.cs  
`PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "OnlineSubsystem", "OnlineSubsystemUtils"});`

This line is the culprit, doesnt any one know if anythign has chnage if so what Module i need to add or a different way to get the UniqueID

`PlayerController->PlayerState->GetUniqueId().ToString()`

---

<div class="post-metadata">

**Author:** ![DentonJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DentonJC](https://forums.unrealengine.com/u/DentonJC)\
**Post date:** [May 5, 2024, 9:38pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/8 "2024-05-05T21:38:30Z")

</div>

I have a C++ project that I’m upgrading from UE5.3 to UE5.4. Its not compiled from source, just using factory fresh UE5.4

When compiling my project, I’m getting:

> UE\_5.4\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2760: syntax error: ‘const’ was unexpected here; expected ‘expression’

Its coming from this function inside ImplicitObjectScaled.h:

```auto
template<typename T>
const T* UnwrapImplicit(const FImplicitObject& Implicit, FVec3& OutScale, FReal &OutMargin)
{
	OutScale = FVec3(1);
	OutMargin = FReal(0);

	if (const TImplicitObjectScaled<T>* ScaledImplicit = Implicit.template GetObject<TImplicitObjectScaled<T>>())
	{
		OutScale = ScaledImplicit->GetScale();
		OutMargin = ScaledImplicit->GetMargin();
		return ScaledImplicit->GetUnscaledObject();
	}
	else if (const TImplicitObjectInstanced<T>* InstancedImplicit = Implicit.template GetObject<TImplicitObjectInstanced<T>>())
	{
		OutMargin = InstancedImplicit->GetMargin();
		return InstancedImplicit->GetInstancedObject();
	}
	else if (const T* RawImplicit = Implicit.template GetObject<T>())
	{
		OutMargin = RawImplicit->GetMargin();
		return RawImplicit;
	}
	else
	{
		return nullptr;
	}
}

```

Not sure how to get around this or why it would be failing to compile this?

---

<div class="post-metadata">

**Author:** ![VortexFX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VortexFX](https://forums.unrealengine.com/u/VortexFX)\
**Post date:** [May 6, 2024, 6:18pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/9 "2024-05-06T18:18:24Z")

</div>

Bloody hell!

PlayerState-\>GetUniqueId().ToString()  
PlayerState-\>GetUniqueId()-\>ToString()

---

<div class="post-metadata">

**Author:** ![eagletree](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eagletree](https://forums.unrealengine.com/u/eagletree)\
**Post date:** [May 8, 2024, 8:35pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/10 "2024-05-08T20:35:23Z")

</div>

I thought I would include here what I found. In my project, after making the above target.cs changes plus adding in the following to build.cs, I still received errors.

Into build.cs  
CppStandard = CppStandardVersion.Cpp20;

The remaining errors were for lack of include files that had not given me problems prior to 5.4.1. The error was like: invalid application of ‘sizeof’ casts.h

The error called out casts for 3 of my classes and UGameInstance. This error didn’t point back into any of my code, but by searching for where I had done Casts of the types mentioned in the error, I was able to find the files that lacked includes and add the includes in. All had been defined with the class statement and apparently no longer could be resolved. They had all worked fine prior to 5.4.1.

If you have many returns from a search for the casted class (e.g., search for

`Cast<TheUnresolvedClass>(somepointer);`

It takes quite a bit of time to find the instances that are actually causing the problem but eventually I was able to get rid of all of them.

This was on Mac and XCode and I’m guessing such a glaring issue would not have been present on more tested windows and VC versions without something mentioned in the release notes. In each case, it was where I’d used a class rather than #include, though not all class statements caused the problem, just 4 out of 20 or 30.

---

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [May 12, 2024, 7:52pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/11 "2024-05-12T19:52:48Z")

</div>

Hi, is there any logic or reason behind changing the main editors Tool Menu first section name from “Tools” to “Instrumentation”?  
It doesn’t have an access point either:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/4/bf42c910b5cdb4c3e09e4331561580f6ce2fc0af.jpeg)

I’m kind of getting the impression that it’s not really wanting to be added to, in which case - do you think it would be too cheeky to add a tools submenu above that in the Programming section?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/6/3467b4a12b3431a99e097e238a90c32105a7ea8f.png)

---

<div class="post-metadata">

**Author:** ![coolitic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@coolitic](https://forums.unrealengine.com/u/coolitic)\
**Post date:** [May 30, 2024, 5:11pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/12 "2024-05-30T17:11:44Z")

</div>

My code no longer compiles under Visual Studio (but it does via Clang on Linux). Specifically, because a library that I use takes the address of some temporaries, I pass in the following arguments:

```cpp
bOverrideBuildEnvironment = true;

if (Target.Platform == UnrealTargetPlatform.Win64)
    AdditionalCompilerArguments = "/permissive /Zc:hiddenFriend /wd4018 /wd4238 /wd4458 /wd4576";

```

If I compile the 5.3 version of my project w/ Visual Studio (tried both latest MSVC and 14.38-17.8), this works fine, and if I compile the 5.4 version on Linux, it also works fine. Otherwise, however, I get C++ compliance errors for taking the address of temporaries. The other warnings seem to disable just fine, but the permissive C++ compliance doesn’t seem to go through. I also tried setting the BuildSettings to V4, and that didn’t fix it either. I am using the pre-built version of Unreal 5.4.1.

---

<div class="post-metadata">

**Author:** ![Ciberus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ciberus/32/561261_2.png) [@Ciberus](https://forums.unrealengine.com/u/Ciberus)\
**Post date:** [June 1, 2024, 2:07pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/13 "2024-06-01T14:07:13Z")

</div>

UPD Solution - its required to override `GetInstanceMemorySize/InitializeMemory/CleanupMemory` to inherit from `BTCompositeNode` in UE5.4, after [that commit](https://github.com/EpicGames/UnrealEngine/commit/30ab10cfa6697944af0e3260f36bc00e682fa6a5)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/3/8c32b22d2faadd712e0fd7143eaa4ea9af26f6eb.png)

**Original question**

- Can’t inherit from `UBTCompositeNode` due to “unresolved LNK2001” issue, even if its void  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/3/9138c95439f3eb514fc929db7c67e7e0cae16192.png)
- `AIModule` in `PrivateDependencyModuleNames`  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/5/2653245a8e3d4149e963eb2f2b436b83c5131bbd.png)

On UE5.3 same code works fine

> **Logs**
>
> CONSOLE: Use build tool: C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\MSBuild.exe  
> 17:03:04 Building S:\Epic Games\UE\_5.4\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj  
> 17:03:04 Building S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Build\EpicGames.Build.csproj  
> 17:03:04 Building S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Core\EpicGames.Core.csproj  
> …  
> …  
> …  
> …  
> …  
> …  
> 17:03:04 Building S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.MsBuild\EpicGames.MsBuild.csproj  
> 17:03:04 Building S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Oodle\EpicGames.Oodle.csproj  
> EpicGames.Core → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Core\bin\Development\net6.0\EpicGames.Core.dll  
> EpicGames.IoHash → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.IoHash\bin\Development\net6.0\EpicGames.IoHash.dll  
> EpicGames.MsBuild → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.MsBuild\bin\Development\net6.0\EpicGames.MsBuild.dll  
> …  
> …  
> EpicGames.Oodle → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Oodle\bin\Development\net6.0\EpicGames.Oodle.dll  
> EpicGames.Serialization → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Serialization\bin\Development\net6.0\EpicGames.Serialization.dll  
> EpicGames.Horde → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.Horde\bin\Development\net6.0\EpicGames.Horde.dll  
> EpicGames.UBA → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.UBA\bin\Development\net6.0\EpicGames.UBA.dll  
> EpicGames.UHT → S:\Epic Games\UE\_5.4\Engine\Source\Programs\Shared\EpicGames.UHT\bin\Development\net6.0\EpicGames.UHT.dll  
> …  
> …  
> …  
> Using bundled DotNet SDK version: 6.0.302  
> Running UnrealBuildTool: dotnet “…..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” UE5\_4\_\_TestCPPWorksEditor Win64 Development -Project=“S:\UE5\_4\_\_TestCPPWorks\UE5\_4\_\_TestCPPWorks.uproject” -WaitMutex -FromMsBuild -architecture=x64  
> Log file: C:\Users\Ciber\AppData\Local\UnrealBuildTool\Log.txt  
> Invalidating makefile for UE5\_4\_\_TestCPPWorksEditor (UE5\_4\_\_TestCPPWorks.Build.cs modified)  
> Parsing headers for UE5\_4\_\_TestCPPWorksEditor  
> Running Internal UnrealHeaderTool S:\UE5\_4\_\_TestCPPWorks\UE5\_4\_\_TestCPPWorks.uproject S:\UE5\_4\_\_TestCPPWorks\Intermediate\Build\Win64\UE5\_4\_\_TestCPPWorksEditor\Development\UE5\_4\_\_TestCPPWorksEditor.uhtmanifest -WarningsAsErrors -installed  
> Total of 0 written  
> Reflection code generated for UE5\_4\_\_TestCPPWorksEditor in 0.869413 seconds  
> Building UE5\_4\_\_TestCPPWorksEditor…  
> Using Visual Studio 2022 14.38.33134 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).  
> Determining max actions to execute in parallel (12 physical cores, 24 logical cores)  
> Executing up to 12 processes, one per physical core  
> Requested 1.5 GB memory per action, 5.75 GB available: limiting max parallel actions to 3  
> Using Parallel executor to run 5 action(s)  
> ------ Building 5 action(s) started ------  
> [1/5] Compile [x64] BTComposite\_RandomSelector.gen.cpp  
> [2/5] Compile [x64] BTComposite\_RandomSelector.cpp  
> [3/5] Link [x64] UnrealEditor-UE5\_4\_\_TestCPPWorks.lib  
> Creating library S:\UE5\_4\_\_TestCPPWorks\Intermediate\Build\Win64\x64\UnrealEditor\Development\UE5\_4\_\_TestCPPWorks\UnrealEditor-UE5\_4\_\_TestCPPWorks.lib and object S:\UE5\_4\_\_TestCPPWorks\Intermediate\Build\Win64\x64\UnrealEditor\Development\UE5\_4\_\_TestCPPWorks\UnrealEditor-UE5\_4\_\_TestCPPWorks.exp  
> [4/5] Link [x64] UnrealEditor-UE5\_4\_\_TestCPPWorks.dll  
> Creating library S:\UE5\_4\_\_TestCPPWorks\Intermediate\Build\Win64\x64\UnrealEditor\Development\UE5\_4\_\_TestCPPWorks\UnrealEditor-UE5\_4\_\_TestCPPWorks.sup.lib and object S:\UE5\_4\_\_TestCPPWorks\Intermediate\Build\Win64\x64\UnrealEditor\Development\UE5\_4\_\_TestCPPWorks\UnrealEditor-UE5\_4\_\_TestCPPWorks.sup.exp  
> 11\>BTComposite\_RandomSelector.gen.cpp.obj: Error LNK2001 : unresolved external symbol "public: virtual void \_\_cdecl UBTCompositeNode::InitializeMemory(class UBehaviorTreeComponent &,unsigned char \*,enum EBTMemoryInit::Type)const " (?InitializeMemory@UBTCompositeNode@@UEBAXAEAVUBehaviorTreeComponent@@PEAEW4Type@EBTMemoryInit@@@Z)  
> 11\>BTComposite\_RandomSelector.gen.cpp.obj: Error LNK2001 : unresolved external symbol "public: virtual void \_\_cdecl UBTCompositeNode::CleanupMemory(class UBehaviorTreeComponent &,unsigned char \*,enum EBTMemoryClear::Type)const " (?CleanupMemory@UBTCompositeNode@@UEBAXAEAVUBehaviorTreeComponent@@PEAEW4Type@EBTMemoryClear@@@Z)  
> 11\>UnrealEditor-UE5\_4\_\_TestCPPWorks.dll: Error LNK1120 : 2 unresolved externals  
> Total time in Parallel executor: 2.15 seconds  
> Total execution time: 5.00 seconds  
> 11\>Microsoft.MakeFile.Targets(44,5): Error MSB3073 : The command ““S:\Epic Games\UE\_5.4\Engine\Build\BatchFiles\Build.bat” UE5\_4\_\_TestCPPWorksEditor Win64 Development -Project=“S:\UE5\_4\_\_TestCPPWorks\UE5\_4\_\_TestCPPWorks.uproject” -WaitMutex -FromMsBuild -architecture=x64” exited with code 6.

P.S.  
Probably that commit broke possibility to inherit but can’t get how  
[https://github.com/EpicGames/UnrealEngine/commit/30ab10cfa6697944af0e3260f36bc00e682fa6a5](https://github.com/EpicGames/UnrealEngine/commit/30ab10cfa6697944af0e3260f36bc00e682fa6a5)

---

<div class="post-metadata">

**Author:** ![Kettenotter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kettenotter/32/620822_2.png) [@Kettenotter](https://forums.unrealengine.com/u/Kettenotter)\
**Post date:** [June 3, 2024, 1:57pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/14 "2024-06-03T13:57:52Z")

</div>

Anyone else gets the:

```auto
Error C4702 : unreachable code

```

It’s super annoying. I often return code instead of commenting out the lines after. I think the compiler will strip it away anyway and it’s just a warning which UE promotes to an error.  
Can I somehow disable it everywhere?

For now I just disabled it in the relevant headers above the includes with:

```auto
#pragma warning(disable: 4702)

```

---

<div class="post-metadata">

**Author:** ![AmphDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AmphDev](https://forums.unrealengine.com/u/AmphDev)\
**Post date:** [June 5, 2024, 9:46am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/15 "2024-06-05T09:46:25Z")

</div>

add this to your editor/game/client etc. target file and this should disable all 4702 warning/error

```auto
        bOverrideBuildEnvironment = true;
        AdditionalCompilerArguments += "/wd4702";

```

ps: if you compile things for linux os as well, linux doesnt need this. so this is a “better” way probably:

```auto
		if (Target.Platform == UnrealTargetPlatform.Win64)
		{
			bOverrideBuildEnvironment = true;
			AdditionalCompilerArguments += "/wd4702";
		}

```

---

<div class="post-metadata">

**Author:** ![w\_Jason](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@w\_Jason](https://forums.unrealengine.com/u/w_Jason)\
**Post date:** [June 5, 2024, 10:36am UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/16 "2024-06-05T10:36:14Z")

</div>

Engine\Source\Runtime\Core\Public\Containers\Map.h(1031) : error C4702 When Compile with “Debug Game Editor” Config.

---

<div class="post-metadata">

**Author:** ![Kettenotter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kettenotter/32/620822_2.png) [@Kettenotter](https://forums.unrealengine.com/u/Kettenotter)\
**Post date:** [June 5, 2024, 12:55pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/17 "2024-06-05T12:55:23Z")

</div>

The message above yours has the solution 🙂 you can also remove all unused code instead. (Had the same problem)

@AmphDev Thanks!

---

<div class="post-metadata">

**Author:** ![Fenyx\_Invincible](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fenyx\_Invincible](https://forums.unrealengine.com/u/Fenyx_Invincible)\
**Post date:** [June 6, 2024, 2:35pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/18 "2024-06-06T14:35:55Z")

</div>

Hi! Does anybody know how can be fixed following error?

```auto
0>Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" TacticalEditor Win64 DebugGame -Project="C:\Projects\Tactical\Tactical.uproject" -WaitMutex
0>Log file: C:\Users\Fenyx\AppData\Local\UnrealBuildTool\Log.txt
0>Using 'git status' to determine working set for adaptive non-unity build (C:\Projects\Tactical).
0>Invalidating makefile for TacticalEditor (working set of source files changed)
0>Warning: C:\Projects\Tactical\Tactical.uproject does not list plugin 'MovieRenderPipeline' as a dependency, but module 'Tactical' depends on 'MovieRenderPipelineCore'.
0>Parsing headers for TacticalEditor
0> Running Internal UnrealHeaderTool C:\Projects\Tactical\Tactical.uproject C:\Projects\Tactical\Intermediate\Build\Win64\TacticalEditor\DebugGame\TacticalEditor.uhtmanifest -WarningsAsErrors -installed
0>Total of 0 written
0>Reflection code generated for TacticalEditor in 4.1207242 seconds
0>Building TacticalEditor...
0>Using Visual Studio 2022 14.38.33138 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
0>[Upgrade]
0>[Upgrade] Using backward-compatible include order. The latest version of UE has changed the order of includes, which may require code changes. The current setting is:
0>[Upgrade] IncludeOrderVersion = EngineIncludeOrderVersion.Oldest
0>[Upgrade] Suppress this message by setting 'IncludeOrderVersion = EngineIncludeOrderVersion.Latest;' in TacticalEditor.Target.cs.
0>[Upgrade] Alternatively you can set this to 'EngineIncludeOrderVersion.Latest' to always use the latest include order. This will potentially cause compile errors when integrating new versions of the engine.
0>[Upgrade]
0>[Adaptive Build] Excluded from Tactical unity file: GlobalMapParty.cpp, TacticalCharacter.cpp, TacticalCharacterPlayer.cpp, NearestEnemyPlayerContext.cpp, CharacterAttributesComponent.cpp, EquipmentComponent.cpp, PartyAttributesComponent.cpp, CharacterAttributes.cpp, TacticalBattleAiManager.cpp, TacticalBattleManager.cpp, BaseArmor.cpp, Placeable.cpp, TrainningYard.cpp
0>Determining max actions to execute in parallel (12 physical cores, 16 logical cores)
0> Executing up to 12 processes, one per physical core
0> Requested 1.5 GB memory per action, 2.2 GB available: limiting max parallel actions to 1
0>Using Parallel executor to run 9 action(s)
0>------ Building 9 action(s) started ------
0>[1/9] Compile [x64] Module.Tactical.20.cpp
0>[2/9] Compile [x64] Module.Tactical.21.cpp
0>[3/9] Compile [x64] Module.Tactical.22.cpp
0>ImplicitObjectScaled.h(1129): Error C2760 : syntax error: 'const' was unexpected here; expected 'expression'
0>ImplicitObjectScaled.h(1129): Reference : error recovery skipped: 'const'
0>ImplicitObjectScaled.h(1129): Error C2065 : 'ScaledImplicit': undeclared identifier
0>ImplicitObjectScaled.h(1129): Error C2903 : 'GetObjectW': symbol is neither a class template nor a function template
0>ImplicitObjectScaled.h(1129): Error C3878 : syntax error: unexpected token '(' following 'expression'
0>ImplicitObjectScaled.h(1129): Reference : error recovery skipped: '('
0>ImplicitObjectScaled.h(1129): Error C2760 : syntax error: ')' was unexpected here; expected 'statement'
0>ImplicitObjectScaled.h(1129): Error C3878 : syntax error: unexpected token ')' following 'selection_statement'
0>ImplicitObjectScaled.h(1129): Reference : error recovery skipped: ')'
0>ImplicitObjectScaled.h(1131): Error C2065 : 'ScaledImplicit': undeclared identifier
0>ImplicitObjectScaled.h(1132): Error C2065 : 'ScaledImplicit': undeclared identifier
0>ImplicitObjectScaled.h(1133): Error C2065 : 'ScaledImplicit': undeclared identifier
0>ImplicitObjectScaled.h(1135): Error C3878 : syntax error: unexpected token 'else' following 'statement_seq'
0>ImplicitObjectScaled.h(1135): Reference : missing one of: '}' ?
0>ImplicitObjectScaled.h(1135): Reference : error recovery skipped: 'else if ( . . . ;'
0>ImplicitObjectScaled.h(1139): Reference : parsing resumes here
type or paste code here

```

It’s a last one migration issue and have no clue how to fix it :\*(

---

<div class="post-metadata">

**Author:** ![QuantaCat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@QuantaCat](https://forums.unrealengine.com/u/QuantaCat)\
**Post date:** [July 9, 2024, 5:27pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/19 "2024-07-09T17:27:19Z")

</div>

Hey, did you figure this out? ran into the same issue. thanks!

---

<div class="post-metadata">

**Author:** ![Ciberus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ciberus/32/561261_2.png) [@Ciberus](https://forums.unrealengine.com/u/Ciberus)\
**Post date:** [July 9, 2024, 6:25pm UTC](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583/20 "2024-07-09T18:25:07Z")

</div>

yep

> UPD Solution - its required to override `GetInstanceMemorySize/InitializeMemory/CleanupMemory` to inherit from `BTCompositeNode` in UE5.4, after [that commit](https://github.com/EpicGames/UnrealEngine/commit/30ab10cfa6697944af0e3260f36bc00e682fa6a5)

even if no custom memory required you should override those methods to work

[Next page](https://forums.unrealengine.com/t/c-transition-guide-for-5-4/1835583.md?page=2)
