I get the following compilation error when trying to build a project containing an enum
1>------ Build started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
1> Performing full C++ include scan (building a new target)
1> Target is up to date
2>------ Build started: Project: Testing, Configuration: Development_Editor x64 ------
2> Performing full C++ include scan (building a new target)
2> Creating makefile for TestingEditor (no existing makefile)
2> Building UnrealHeaderTool...
2> Target is up to date
2> Parsing headers for TestingEditor
2> Running UnrealHeaderTool "C:\Users\\Documents\Unreal Projects\Testing\Testing.uproject" "C:\Users\\Documents\Unreal Projects\Testing\Intermediate\Build\Win64\TestingEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error"
2> C:/Users//Documents/Unreal Projects/Testing/Source/Testing/EnumDecayModes.h(12) : Missing '{' in 'Enum'
2>Error : Failed to generate code for TestingEditor - error code: OtherCompilationError (5)
2> UnrealHeaderTool failed for target 'TestingEditor' (platform: Win64, module info: C:\Users\\Documents\Unreal Projects\Testing\Intermediate\Build\Win64\TestingEditor\Development\UnrealHeaderTool.manifest).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command "D:\GitHub\UnrealEngine\Engine\Build\BatchFiles\Build.bat TestingEditor Win64 Development "C:\Users\\Documents\Unreal Projects\Testing\Testing.uproject" -waitmutex" exited with code -1.
========== Build: 1 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========
With the enum defined as follows
#pragma once
#include "Engine/UserDefinedEnum.h"
#include "EnumDecayModes.generated.h"
/**
*
*/
UENUM(BlueprintType)
enum class TESTING_API UEnumDecayModes : uint8 {
BetaMinus UMETA(DisplayName = "Beta Minus"),
BetaPlus UMETA(DisplayName = "Beta Plus"),
DoubleBetaMinus UMETA(DisplayName = "Double Beta Minus"),
DoubleBetaPlus UMETA(DisplayName = "Double Beta Plus"),
Alpha UMETA(DisplayName = "Alpha"),
Gamma UMETA(DisplayName = "Gamma"),
Stable UMETA(DisplayName = "Stable"),
};
I found this question here from over a year ago which states that this problem was fixed in UE 4.5 but i am still experiencing this error in a build i did from source today.
Thanks in advance
Hope this can be fixed soon