Unrecognized type xxx type must be a UCLASS, USTRUCT or UENUM

Hello, I seem be missing something as there seems to be issue with blueprint structs in c++

for example if I have struct that required before another struct I keep getting error.

Unrecognized type xxx type must be a UCLASS, USTRUCT or UENUM

/** TextObject */
USTRUCT()
struct FCreditsTextObjectAdvanced : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()

	/** Credits text properties text */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	FCreditsTextProperties TextProperties; // Blueprints/Structs/Backend/TextProperties

	/** Credits text properties text */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	FCreditsImageProperties ImageProperties; // Blueprints/Structs/Backend/ImageProperties

	/** Credits text properties text */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	FCreditsPaddingMarginProperties PaddingProperties; // Blueprints/Structs/Backend/PaddingMargin
};

but then if the FCreditsTextProperties is called after the above struct I keep getting that error. causing chicken and egg scenario.

I not sure how to fix this as rearranging the code is not the answer as the plan originally was to move the backend structs and default structs to there own files.

what type error you get when you put FCreditsTextProperties? no xxx plz ;p

I already have that for example

/** TextProperties */
USTRUCT()
struct FCreditsTextProperties : public FTableRowBase
{
	GENERATED_USTRUCT_BODY()

	/** Credits text properties text */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	FString Text;

	/** Credits text properties font */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	UFont* Font;

	/** Credits text properties font material */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	UMaterialInterface* FontMaterial;

	/** Credits text properties font size */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	int32 FontSize;

	/** Credits text properties font text color */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Credits)
	FLinearColor TextColor;
}; 

then I get the following error:
Severity Code Description Project File Line Suppression State
Error Unrecognized type ‘FCreditsTextProperties’ - type must be a UCLASS, USTRUCT or UENUM NorsePlugins F:\Unreal Engine 4.20\NorsePlugins\Plugins\Credits\Source\Credits\Public\CreditsManager.h 73

Do you have the include set up for FTableRowBase

yes, these are my includes in the header.

#pragma once

#include “CoreMinimal.h”

#include “Stats/Stats.h”
#include “UObject/ObjectMacros.h”
#include “UObject/Object.h”
#include “UObject/ObjectMacros.h”
#include “UObject/ScriptMacros.h”
#include “Engine/DataTable.h”

#include “CreditsManager.generated.h”

Make a forward declaration:

Just declare your struct above the body of the second struct and then define the body of the first one.

example:

struct FCreditsTextProperties;

struct FCreditsTextObjectAdvanced
{
    // ...code using FCreditsTextProperties goes here
}

struct FCreditsTextProperties
{
    // ...code...
}