Replacing GENERATED_UINTERFACE_BODY() with GENERATED_BODY() in 4.7.0 or above results in an Unreal Header Tool crash and build failure in Visual Studio.
This was working in 4.6.1, but when tested in 4.7.0, 4.7.1, and 4.8 (Main), the build failed each time.
#pragma once #include "ToStringInterface.generated.h" UINTERFACE(MinimalAPI) class UToStringInterface : public UInterface { GENERATED_UINTERFACE_BODY() }; class IToStringInterface { GENERATED_IINTERFACE_BODY() virtual FString ToString(); };
UToStringInterface::UToStringInterface(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) { } FString IToStringInterface::ToString() { return "IToStringInterface::ToString()"; }
RESULT:
The Unreal Header Generation Tool crashes and Visual Studio displays the following output:
1>Error : Failed to generate code for TestInterface2Editor - error code: -1073741819 (-1073741819) 1> UnrealHeaderTool failed for target 'TestInterface2Editor' (platform: Win64, module info: C:\Users\Tim.Lincoln\Documents\Unreal Projects\TestInterface2\Intermediate\Build\Win64\TestInterface2Editor\Development\UnrealHeaderTool.manifest). 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "D:\Source\UnrealEngine-4.7.0-release\Engine\Build\BatchFiles\Build.bat TestInterface2Editor Win64 Development "C:\Users\Tim.Lincoln\Documents\Unreal Projects\TestInterface2\TestInterface2.uproject"" exited with code -1. ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
EXPECTED:
The build completes successfully.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Foundation - Core |
---|---|
Affects Versions | 4.7, 4.7.1, 4.8 |
Target Fix | 4.8 |
Fix Commit | 2481360 |
---|
Created | Mar 3, 2015 |
---|---|
Resolved | Mar 26, 2015 |
Updated | Sep 23, 2019 |