Generated Macro code ruined my migration to Unreal 5.3

Hi, I have experienced migration my code from 4.26 → 5.0 → 5.1 → 5.2.
But recent migration to 5.3 is really frustrating.

I follow typical procedure by:

  1. re-generate project files.
  2. Recompile.

But there are a lot of error in macro code GENERATED by the engine. (*.gen.cpp)
A example like this:

In file included from /home/sbbg/Shared/UE5/IntuitiveMeleeCombat_5.3/Intermediate/Build/Linux/UnrealEditor/Inc/IntuitiveMeleeCombat/UHT/ExtButton.gen.cpp:8:
In file included from /home/sbbg/Shared/UE5/IntuitiveMeleeCombat_5.3/Source/IntuitiveMeleeCombat/UI/ExtButton.h:6:
In file included from Runtime/UMG/Public/Blueprint/UserWidget.h:17:
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/UMG/Public/Components/Widget.h:222:2: error: unknown type name 'UE_FIELD_NOTIFICATION_DECLARE_CLASS_DESCRIPTOR_BASE_BEGIN'
        UE_FIELD_NOTIFICATION_DECLARE_CLASS_DESCRIPTOR_BASE_BEGIN(UMG_API)
        ^
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/UMG/Public/Components/Widget.h:222:67: error: expected member name or ';' after declaration specifiers
        UE_FIELD_NOTIFICATION_DECLARE_CLASS_DESCRIPTOR_BASE_BEGIN(UMG_API)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ^
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/UMG/Public/Components/Widget.h:217:2: error: allocating an object of abstract class type 'UWidget'
        GENERATED_UCLASS_BODY()
        ^
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:711:36: note: expanded from macro 'GENERATED_UCLASS_BODY'
#define GENERATED_UCLASS_BODY(...) GENERATED_BODY_LEGACY()
                                   ^
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:707:36: note: expanded from macro 'GENERATED_BODY_LEGACY'
#define GENERATED_BODY_LEGACY(...) BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,_GENERATED_BODY_LEGACY);
                                   ^
/home/sbbg/Shared/UE5/UE5.3.2/Engine/Source/Runtime/CoreUObject/Public/UObject/ObjectMacros.h:703:37: note: expanded from macro 'BODY_MACRO_COMBINE'
#define BODY_MACRO_COMBINE(A,B,C,D) BODY_MACRO_COMBINE_INNER(A,B,C,D)

But these code can be compiled with Unreal 5.2 without any error or warning.
May someone share some tips how to work around these?
Thank you.

also i have same issue

1 Like

I also have the same issue when trying to package for Linux, does anyone have a fix for this by any chance?

1 Like

I found what the issue was (for me, at least) - in your Target.cs and TargetEditor.cs, ensure you are using DefaultBuildSettings.V4 (or .Latest)

1 Like

I just kind of manage that.
It’s build settings related changes screwing us.

I had to manually changes the following in project/Source/project/project.Build.cs
to conform the new include behavior.


                 PublicIncludePaths.AddRange(
                         new string[] {
                             Path.Combine( ModuleDirectory ),
                             Path.Combine( EngineDirectory, "Source/Runtime" ),
                             Path.Combine( EngineDirectory, "Source/Runtime/UMG/Public/Blueprint" ),
                             Path.Combine( EngineDirectory, "Source/Runtime/Engine/Public/Net" )
                         } );

You might need manual tweaking a bit though.
Good luck

1 Like

Fantastic work! Just checking in to see if this was reported, as it may help correct the migration workflow in the future!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.