# 4.24 C++ Transition Guide

**URL:** <https://forums.unrealengine.com/t/4-24-c-transition-guide/135107>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [December 16, 2019, 5:55pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107 "2019-12-16T17:55:09Z")\
**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:** [December 16, 2019, 5:55pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/1 "2019-12-16T17:55:09Z")

</div>

Dear Community,

For anyone wishing to share their notes or ask questions about the C++ upgrade to 4.24, feel free to do so here!

❤

Rama

---

<div class="post-metadata">

**Author:** ![El-Magic16](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/el-magic16/32/88715_2.png) [@El-Magic16](https://forums.unrealengine.com/u/El-Magic16)\
**Post date:** [December 19, 2019, 1:11am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/2 "2019-12-19T01:11:15Z")

</div>

**The “Developer” module type is now deprecated**

When compiling editor plugins for UE4.24 you will see one of these 2 warnings:

> [@](#):
>
> WARNING: The ‘Developer’ module type has been deprecated in 4.24. Use ‘DeveloperTool’ for modules that can be loaded by game/client/server targets in non-shipping configurations, or ‘UncookedOnly’ for modules that should only be loaded by uncooked editor and program targets (eg. modules containing blueprint nodes)

OR

> [@](#):
>
> Warning: The ‘Developer’ module type has been deprecated in 4.24.

The solution is to change “Developer” to “DeveloperTool”

**Before 4.23:**

```auto

    "Modules": 
        {
            "Name": "Debug", [INDENT=3] **"Type": "Developer",** [/INDENT]
             "LoadingPhase": "PreDefault",
            "WhitelistPlatforms": 
                "Win64",
                "Win32",
                "Mac",
                "Linux"
            ]
        }
    ]

```

**After 4.24:**

```auto

    "Modules": 
        {
            "Name": "Debug", [INDENT=3] **"Type": "DeveloperTool",** [/INDENT]
             "LoadingPhase": "PreDefault",
            "WhitelistPlatforms": 
                "Win64",
                "Win32",
                "Mac",
                "Linux"
            ]
        }
    ]

```

---

<div class="post-metadata">

**Author:** ![El-Magic16](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/el-magic16/32/88715_2.png) [@El-Magic16](https://forums.unrealengine.com/u/El-Magic16)\
**Post date:** [December 19, 2019, 1:40am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/3 "2019-12-19T01:40:13Z")

</div>

**bFasterWithoutUnity is now deprecated**

If you are using “bFasterWithoutUnity” in any of your \ ***.Build.cs** files, you will see this warning when compiling your modules:

> [@](#):
>
> Warning CS0618: ‘UnrealBuildTool.ModuleRules.bFasterWithoutUnity’ is obsolete: ‘bFasterWithoutUnity has been deprecated in favor of setting ‘bUseUnity’ on a per module basis in BuildConfiguration’

It has now been deprecated in favor of “bUseUnity”.

**Before 4.23:**

```auto

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class YourProject : ModuleRules
{
    public YourProject(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;[INDENT=2][SIZE=14px][SIZE=14px] **bFasterWithoutUnity = true;** [/SIZE][/SIZE][/INDENT]

        PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });

        PrivateDependencyModuleNames.AddRange(new string] { });
    }
}

```

**After 4.24:**

```auto

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class YourProject : ModuleRules
{
    public YourProject(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;[INDENT=2][SIZE=14px][SIZE=14px] **bUseUnity = true;** [/SIZE][/SIZE][/INDENT]

        PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });

        PrivateDependencyModuleNames.AddRange(new string] { });
    }
}

```

---

<div class="post-metadata">

**Author:** ![El-Magic16](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/el-magic16/32/88715_2.png) [@El-Magic16](https://forums.unrealengine.com/u/El-Magic16)\
**Post date:** [December 19, 2019, 2:05am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/4 "2019-12-19T02:05:30Z")

</div>

**"Upgrade" log messages and how to remove them**

When upgrading from **4.23** to \*\*4.24, \*\*you may see these “Upgrade” log messages:

```auto

[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
[Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
[Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
[Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
[Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in YourProjectEditor.Target.cs, and explicitly overriding settings that differ from the new defaults.

```

There is nothing you should worry about here, the engine is just telling you what’s been changed since the upgrade from 4.23. These are the new default settings for 4.24  
However, if you want to remove these “Upgrade” log messages, then open your \*\*YourProjectEditor.Target.cs \*\*file and add the highlighted code below, like this:

```auto

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class YourProjectEditorTarget : TargetRules
{
    public YourProjectEditorTarget( TargetInfo Target) : base(Target)
    {
        Type = TargetType.Editor; **DefaultBuildSettings = BuildSettingsVersion.V2;**
 
        ExtraModuleNames.AddRange( new string] { "YourProject" } );
    }
}

```

Click save and rebuild your binaries. The next time you rebuild your binaries, these messages will no longer appear in the log.

And you can explicitly override one of those upgraded default settings, if you didn’t like the change.

For example:  
You can change the default value of **ShadowVariableWarningLevel** to ‘Warning’ instead of the new default which is ‘Error’, like this:

```auto

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class YourProjectEditorTarget : TargetRules
{
    public YourProjectEditorTarget( TargetInfo Target) : base(Target)
    {
        Type = TargetType.Editor; DefaultBuildSettings = BuildSettingsVersion.V2;
  **ShadowVariableWarningLevel = WarningLevel.Warning;**
 
        ExtraModuleNames.AddRange( new string] { "YourProject" } );
    }
}

```

---

<div class="post-metadata">

**Author:** ![Elvince](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elvince](https://forums.unrealengine.com/u/Elvince)\
**Post date:** [December 23, 2019, 8:09pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/5 "2019-12-23T20:09:06Z")

</div>

hi,

It seems that if you don’t have a public/private folder hierarchy, you need to include the module name in the header include file.  
Links to bLegacyPublicIncludePaths default settings. Did I miss something? Thanks,

---

<div class="post-metadata">

**Author:** ![acxsasx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@acxsasx](https://forums.unrealengine.com/u/acxsasx)\
**Post date:** [December 26, 2019, 4:00pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/6 "2019-12-26T16:00:55Z")

</div>

Yah, needed to read this more carefully. When you “suppress” the message, you are then using those new settings.

I use subdirectories in my Public directory which blows up nicely when “suppressing” the message/using the new defaults.

---

<div class="post-metadata">

**Author:** ![vle07](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vle07](https://forums.unrealengine.com/u/vle07)\
**Post date:** [January 6, 2020, 7:58am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/7 "2020-01-06T07:58:31Z")

</div>

I need some help updating a project that uses the Windows Bluetooth API (which works in 4.23). I’m using this header sandwich to get the necessary headers and libraries included:

#include “Windows/AllowWindowsPlatformTypes.h”  
#include “Windows/prewindowsapi.h”

#include \<stdio.h\>  
#include \<windows.h\>  
#include \<setupapi.h\>  
#include \<devguid.h\>  
#include \<regstr.h\>  
#include \<bthdef.h\>  
#include \<Bluetoothleapis.h\>  
#include \<Objbase.h\>  
#pragma comment(lib, “SetupAPI”)  
#pragma comment(lib, “BluetoothApis.lib”)

#include “Windows/PostWindowsApi.h”  
#include “Windows/HideWindowsPlatformTypes.h”

The bluetooth identifiers such as BTH\_LE\_GATT\_CHARACTERISTIC\_VALUE are not found. I’m thinking BluetoothApis.lib isn’t being linked? Was the lib variable changed, or is there anything else I should check? Thanks!

Edit:  
Figured it out. Turns out my macro definitions for \_WIN32\_WINNT and WINVER were reverted back to 0x601 (for WIndows 7) instead of persisting as 0x602 (Windows 8) in my previous build. I have to edit the intermediate files SharedPCH.Engine.h and Definitions.MyApp.h to change these macro definitions. Is there a better way to do this?

---

<div class="post-metadata">

**Author:** ![SerzaNT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SerzaNT](https://forums.unrealengine.com/u/SerzaNT)\
**Post date:** [January 14, 2020, 1:10pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/8 "2020-01-14T13:10:23Z")

</div>

After migration to 4.24 i have following ensureMsgf:

```auto

LogOutputDevice: Error: Ensure condition failed: SyncGroup.GroupLeaderIndex == INDEX_NONE [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/Animation/AnimInstanceProxy.cpp] [Line: 706] 
SyncGroup with GroupIndex=1 had a non -1 group leader index of 0 in asset CharacterMesh0

```

Did anyone encounter this problem?

---

<div class="post-metadata">

**Author:** ![ExperienciaUmbra](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ExperienciaUmbra](https://forums.unrealengine.com/u/ExperienciaUmbra)\
**Post date:** [January 14, 2020, 9:11pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/9 "2020-01-14T21:11:11Z")

</div>

After migrating from 4.23 to 4.24:

cannot open source file “#include JsonUtilities.h”

Changing the import like this:

```auto

#include "Runtime/JsonUtilities/Public/JsonUtilities.h"

```

Results in another error in JsonObjectWrapper.h

```auto

variable "FJsonObjectWrapper" is not a type name 

```

Anybody had this issue?

---

<div class="post-metadata">

**Author:** ![hyperdr1ve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hyperdr1ve](https://forums.unrealengine.com/u/hyperdr1ve)\
**Post date:** [January 15, 2020, 8:14pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/10 "2020-01-15T20:14:46Z")

</div>

> [@ExperienciaUmbra](#):
>
> After migrating from 4.23 to 4.24:
> 
> Results in another error in JsonObjectWrapper.h
> 
> ```auto
> 
> variable "FJsonObjectWrapper" is not a type name 
> 
> ```
> 
> Anybody had this issue?

With the new build defaults, you need to literally include everything, so you need another include for [JsonUtilities/Public/JsonObjectWrapper.h](https://github.com/EpicGames/UnrealEngine/blob/7d9919ac7bfd80b7483012eab342cb427d60e8c9/Engine/Source/Runtime/JsonUtilities/Public/JsonObjectWrapper.h).

---

<div class="post-metadata">

**Author:** ![hyperdr1ve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hyperdr1ve](https://forums.unrealengine.com/u/hyperdr1ve)\
**Post date:** [January 15, 2020, 8:22pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/11 "2020-01-15T20:22:14Z")

</div>

I noticed with BuildSettingsVersion.V2, a change in the way include paths work. I have projects that have the folder structure:

```auto

Source
-Actors
|-SomeActor.h
|-SomeActor.cpp
-Components
|-SomeComponent.h
|-SomeComponent.cpp

```

And I used to include files, for instance in SomeActor.cpp:

```auto

#include "Components/SomeComponent.h"

```

In 4.24 these includes could not be found without specifying the relative path:

```auto

#include "../Components/SomeComponent.h"

```

Unfortunately this broke Clang due to some UHT shenanigans. So the best path forward is to modify the build.cs file to specify all of my private include paths:

```auto

        PrivateIncludePaths.AddRange(
            new string]
            {
                "MyModuleName/Actors",
                "MyModuleName/Components",
            }
        );

```

And then just include the flat file with no path prefix:

```auto

#include "SomeComponent.h"

```

---

<div class="post-metadata">

**Author:** ![Thumper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thumper](https://forums.unrealengine.com/u/Thumper)\
**Post date:** [January 28, 2020, 8:30pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/12 "2020-01-28T20:30:11Z")

</div>

Hi,

```auto

warning C4996: 'AActor::GetComponentsByClass': Use one of the GetComponents implementations as appropriate Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.

```

Trying to convert this line to work on 4.24.1

```auto

auto EffectorComponents = GetOwner()->GetComponentsByClass(UEffectorComponent::StaticClass());

```

Any ideas?

---

<div class="post-metadata">

**Author:** ![IppolitoGermer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ippolitogermer/32/462694_2.png) [@IppolitoGermer](https://forums.unrealengine.com/u/IppolitoGermer)\
**Post date:** [January 28, 2020, 8:56pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/13 "2020-01-28T20:56:05Z")

</div>

error C4456: declaration of ‘class’ hides previous local declaration

---

<div class="post-metadata">

**Author:** ![hyperdr1ve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hyperdr1ve](https://forums.unrealengine.com/u/hyperdr1ve)\
**Post date:** [January 28, 2020, 10:28pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/14 "2020-01-28T22:28:06Z")

</div>

> [@Thumper](#):
>
> Hi,
> 
> ```auto
> 
> warning C4996: 'AActor::GetComponentsByClass': Use one of the GetComponents implementations as appropriate Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
> 
> ```
> 
> Trying to convert this line to work on 4.24.1
> 
> ```auto
> 
> auto EffectorComponents = GetOwner()->GetComponentsByClass(UEffectorComponent::StaticClass());
> 
> ```
> 
> Any ideas?

Try:

```auto

TInlineComponentArray<UEffectorComponent*> EffectorComponents(GetOwner());

```

---

<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:** [February 7, 2020, 8:11am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/15 "2020-02-07T08:11:57Z")

</div>

> [@IppolitoGermer](#):
>
> error C4456: declaration of ‘class’ hides previous local declaration

Please post your code that is triggering the compile error, not just the compile error itself, if you want us to be able to help you debug the matter 🙂

❤

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:** [February 7, 2020, 8:15am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/16 "2020-02-07T08:15:22Z")

</div>

> [@SerzaNT](#):
>
> After migration to 4.24 i have following ensureMsgf:
> 
> ```auto
> 
> LogOutputDevice: Error: Ensure condition failed: SyncGroup.GroupLeaderIndex == INDEX_NONE [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/Animation/AnimInstanceProxy.cpp] [Line: 706]
> SyncGroup with GroupIndex=1 had a non -1 group leader index of 0 in asset CharacterMesh0
> 
> ```
> 
> Did anyone encounter this problem?

This looks like something that would be in your Anim Instance, your Anim BP asset, are you using sync groups?

UE4 Sync Groups

> **[Sync Groups](https://docs.unrealengine.com/5.3/en-US/animation-sync-groups-in-unreal-engine/)**
>
> Synchronize the cycles of animations with different lengths using Sync Groups.

Does this ensure happen every time you restart editor / run PIE?

Does it happen if no characters are in the level and you just use the DefaultPawn?

“SyncGroup with GroupIndex=1 had a non -1 group leader index of 0 in asset CharacterMesh0”

Solution may be as simple as changing your sync group in whatever Anim BP is triggering this ensure.

❤

Rama

---

<div class="post-metadata">

**Author:** ![David\_Gilbert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Gilbert](https://forums.unrealengine.com/u/David_Gilbert)\
**Post date:** [February 14, 2020, 10:37am UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/17 "2020-02-14T10:37:21Z")

</div>

I had to change my

```auto

#include "AllowWindowsPlatformTypes.h"

```

into

```auto

#include "Windows/AllowWindowsPlatformTypes.h"

```

.

Simple fix, but slightly annoying.

---

<div class="post-metadata">

**Author:** ![Stefan\_Lundmark](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stefan\_Lundmark](https://forums.unrealengine.com/u/Stefan_Lundmark)\
**Post date:** [February 17, 2020, 3:15pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/18 "2020-02-17T15:15:13Z")

</div>

![20200217-16_01_02Clipboard.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/4/64bf648e728f586507e54c53fac5d994f3c040a7.png)

This is what shows up for me when loading my 4.22 project in 4.24.

ShooterGame works just fine with the same engine build, so I’ve been comparing them both to see if I can spot any differences but so far I haven’t found any.

Any clever ideas? I’ve deleted Intermediate/Binaries/DerivedDataCache as well but to no avail.

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [February 17, 2020, 3:23pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/19 "2020-02-17T15:23:08Z")

</div>

> [@Stefan\_Lundmark](#):
>
> ![20200217-16_01_02Clipboard.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/4/64bf648e728f586507e54c53fac5d994f3c040a7.png)
> 
> This is what shows up for me when loading my 4.22 project in 4.24.
> 
> ShooterGame works just fine with the same engine build, so I’ve been comparing them both to see if I can spot any differences but so far I haven’t found any.
> 
> Any clever ideas? I’ve deleted Intermediate/Binaries/DerivedDataCache as well but to no avail.

UncookedOnly is a new Project Type that came with 4.24. Likely your Project isn’t pointing to the right engine version (right click on your uproject and select “Switch Unreal Engine Version”), or you didn’t rebuild UHT when you downloaded the latest engine (if you’re building from source).

---

<div class="post-metadata">

**Author:** ![Stefan\_Lundmark](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stefan\_Lundmark](https://forums.unrealengine.com/u/Stefan_Lundmark)\
**Post date:** [February 17, 2020, 3:50pm UTC](https://forums.unrealengine.com/t/4-24-c-transition-guide/135107/20 "2020-02-17T15:50:30Z")

</div>

> [@ExtraLifeMatt](#):
>
> UncookedOnly is a new Project Type that came with 4.24. Likely your Project isn’t pointing to the right engine version (right click on your uproject and select “Switch Unreal Engine Version”), or you didn’t rebuild UHT when you downloaded the latest engine (if you’re building from source).

Thanks for replying, Matt.

They are pointing at the same version. Same path and same engine association ID. Same configuration too. See why I am confused? 🙂

Will rebuild again!

\*\*Edit: I deleted “Intermediate” and the x64/x86 folders inside “Binaries” and then rebuilt the Engine. Works now! \*\*

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