# Can't generate generated headers

**URL:** <https://forums.unrealengine.com/t/cant-generate-generated-headers/341955>\
**Category:** Pipeline & Plugins\
**Tags:** unreal-engine, generated, build-failed, Visual-Studio, CPP, question\
**Created:** [December 20, 2015, 2:32am UTC](https://forums.unrealengine.com/t/cant-generate-generated-headers/341955 "2015-12-20T02:32:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_9b1d6047](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9b1d6047](https://forums.unrealengine.com/u/anonymous_user_9b1d6047)\
**Post date:** [December 20, 2015, 2:32am UTC](https://forums.unrealengine.com/t/cant-generate-generated-headers/341955/1 "2015-12-20T02:32:24Z")

</div>

I have a header file that defines a USTRUCT, which should have an accompanying generated header, but it doesn’t. I got it working once, but then I added a forward declaration between the #includes and the USTRUCT, and now it’s broken again. Deleting the declaration doesn’t help.

I tried the troubleshooting steps [here][1], which fixed the problem when I first created the file, but it doesn’t work anymore. I looked for the actual generated.h file in the directories described [here][2], but it isn’t there. I’ve tried multiple combinations of deleting, generating, rebuilding, and rebooting in several different orders, but nothing seems to help.

Here’s the relevant code snippet:

```
#pragma once

#include "SlateLayoutTransform.h"
#include "SlateRenderTransform.h"
#include "PaintGeometry.h"
#include "SWidget.h"
#include "LayoutGeometry.h"
#include "KGeometry.generated.h"

/* Forward Declaration */
class FKArrangedWidget

/**
* Represents the position, size, and absolute position of a Widget in Slate.
* The absolute location of a geometry is usually screen space or
* window space depending on where the geometry originated.
* Geometries are usually paired with a SWidget pointer in order
* to provide information about a specific widget (see FArrangedWidget).
* A KGeometry's parent is generally thought to be the KGeometry of the
* the corresponding parent widget.
*/
USTRUCT(BlueprintType)
struct KAELUICORE_API FKGeometry
{
	GENERATED_USTRUCT_BODY()

public:

	/**
	* Default constructor. Creates a geometry with identity transforms.
	*/
	FKGeometry();

```

and the same code with highlighting and Intellisense squigglies:

 ![71334-error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/7/4474c3a4d773666a50181eecdfce8ee35399d76f.png)

and the rebuild error:

```
1>------ Rebuild All started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
2>------ Rebuild All started: Project: KaelUICore, Configuration: Development_Editor x64 ------
2> Cleaning KaelUICoreEditor Binaries...
2> Creating makefile for KaelUICoreEditor (no existing makefile)
2> Performing full C++ include scan (no include cache file)
2> Parsing headers for KaelUICoreEditor
2> Running UnrealHeaderTool "C:\Users\evnha\Documents\Unreal Projects\KaelUI\KaelUICore\KaelUICore.uproject" "C:\Users\evnha\Documents\Unreal Projects\KaelUI\KaelUICore\Intermediate\Build\Win64\KaelUICoreEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
2> Reflection code generated for KaelUICoreEditor in 5.5811898 seconds
2> Performing 7 actions (4 in parallel)
2> [3/7] Resource ModuleVersionResource.rc.inl
2> [2/7] Resource PCLaunch.rc
2> PCH.KaelUICore.h.cpp
2> KaelUICore.cpp
2> KGeometry.cpp
2> KArrangedWidget.cpp
2>C:\Users\evnha\Documents\Unreal Projects\KaelUI\KaelUICore\Source\KaelUICore\Classes\KGeometry.h(11): fatal error C1083: Cannot open include file: 'KGeometry.generated.h': No such file or directory
2>c:\users\evnha\documents\unreal projects\kaelui\kaeluicore\source\kaeluicore\classes\KGeometry.h(11): fatal error C1083: Cannot open include file: 'KGeometry.generated.h': No such file or directory
2> -------- End Detailed Actions Stats -----------------------------------------------------------
2>ERROR : UBT error : Failed to produce item: C:\Users\evnha\Documents\Unreal Projects\KaelUI\KaelUICore\Binaries\Win64\UE4Editor-KaelUICore.dll
2> Total build time: 33.58 seconds
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(42,5): error MSB3075: The command ""C:\Program Files\Epic Games\4.10\Engine\Build\BatchFiles\Rebuild.bat" KaelUICoreEditor Win64 Development "C:\Users\evnha\Documents\Unreal Projects\KaelUI\KaelUICore\KaelUICore.uproject" -rocket -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

```

and the directory that should contain the “Inc” directory where the generated headers are stored:

![71335-directory.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/c/d2c62c74acbab8afb132d950f997b2940b1907b7.png)

At the moment, my classes are both just shameless copies of Slate classes with variables renamed and includes fixed, so there shouldn’t be any syntax errors. I haven’t even started changing functionality - I just want the thing to compile. Help?

---

<div class="post-metadata">

**Author:** ![ndelchen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ndelchen](https://forums.unrealengine.com/u/ndelchen)\
**Post date:** [November 7, 2017, 2:03pm UTC](https://forums.unrealengine.com/t/cant-generate-generated-headers/341955/2 "2017-11-07T14:03:42Z")

</div>

have you found any solution to this?
