# C++ StateTree Custom Class causing Build Failures maybe Missing Includes?

**URL:** <https://forums.unrealengine.com/t/c-statetree-custom-class-causing-build-failures-maybe-missing-includes/1265262>\
**Category:** C++\
**Tags:** unreal-engine, failed, CPP\
**Created:** [August 18, 2023, 7:01pm UTC](https://forums.unrealengine.com/t/c-statetree-custom-class-causing-build-failures-maybe-missing-includes/1265262 "2023-08-18T19:01:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giraffelitis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/giraffelitis/32/741987_2.png) [@Giraffelitis](https://forums.unrealengine.com/u/Giraffelitis)\
**Post date:** [August 18, 2023, 7:01pm UTC](https://forums.unrealengine.com/t/c-statetree-custom-class-causing-build-failures-maybe-missing-includes/1265262/1 "2023-08-18T19:01:29Z")

</div>

I am trying to add StateTrees into my project via C++. I have added in the `PublicDependencyModuleNames.AddRange(new string[] {"StateTreeModule"}` into my build.cs.

When I generate a new class from the editor derived from class UStateTreeTaskBlueprintBase as seen here:

```auto
UCLASS()
class SI_PROTOTYPE_API USI_StateTree_TaskBase : public UStateTreeTaskBlueprintBase
{
	GENERATED_BODY()

public:
	virtual void ExitState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition);

};

```

It gives me this error:

```auto
  Building 3 actions with 3 processes...
  [1/3] Compile [x64] SI_StateTree_TaskBase.cpp
  E:\Unreal Engine\UE_5.2\Engine\Plugins\Runtime\StateTree\Source\StateTreeModule\Public\StateTree.h(80): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

```

The line shown in the error is the UnrealEngine based class and line: 80 is GENERATED\_BODY()

I feel like I a missing and include or a dependency but I have not been able to uncover which one I am missing. Has anyone else seen this issue or ran into a similar problem?

here are the build.cs includes I think I needed to add for this to work  
“StateTreeModule”, “GameplayStateTreeModule”
