x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can't generate generated headers

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, 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, 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: code screenshot

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: directory screenshot

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?

Product Version: UE 4.10
Tags:
error.png (25.1 kB)
directory.png (5.8 kB)
more ▼

asked Dec 20 '15 at 02:32 AM in C++ Programming

avatar image

evnhali
46 4 5 7

avatar image ndelchen Nov 07 '17 at 02:03 PM

have you found any solution to this?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question