Developer Notes

Is duplicated by UE-7578

Description

Slate Widget fails to compile when you add it to a new project. Expected as a user that anything in that default list should be able to be added and compile fine without making any changes.

CompilerResultsLog: Info [1/2] Compile SMyCompoundWidget.cpp
CompilerResultsLog: Info In file included from /Users/Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.cpp:4:
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:8:46: error: unknown class name 'SCompoundWidget'; did you mean 'SMyCompoundWidget'?
CompilerResultsLog: Info class NEWCODE_API SMyCompoundWidget : public SCompoundWidget
CompilerResultsLog: Info ^~~~~~~~~~~~~~~
CompilerResultsLog: Info SMyCompoundWidget
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:8:19: note: 'SMyCompoundWidget' declared here
CompilerResultsLog: Info class NEWCODE_API SMyCompoundWidget : public SCompoundWidget
CompilerResultsLog: Info ^
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:8:46: error: base class has incomplete type
CompilerResultsLog: Info class NEWCODE_API SMyCompoundWidget : public SCompoundWidget
CompilerResultsLog: Info ~~~~~~^~~~~~~~~~~~~~
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:8:19: note: definition of 'SMyCompoundWidget' is not complete until the closing '}'
CompilerResultsLog: Info class NEWCODE_API SMyCompoundWidget : public SCompoundWidget
CompilerResultsLog: Info ^
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:11:2: error: unknown type name 'SLATE_BEGIN_ARGS'
CompilerResultsLog: Info SLATE_BEGIN_ARGS(SMyCompoundWidget)
CompilerResultsLog: Info ^
CompilerResultsLog: Info ../../../../../Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.h:12:4: error: expected ';' at end of declaration list
CompilerResultsLog: Info {}
CompilerResultsLog: Info ^
CompilerResultsLog: Info ;
CompilerResultsLog: Info /Users/Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.cpp:6:1: error: unknown type name 'BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION'
CompilerResultsLog: Info BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
CompilerResultsLog: Info ^
CompilerResultsLog: Info /Users/Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.cpp:7:1: error: expected unqualified-id
CompilerResultsLog: Info void SMyCompoundWidget::Construct(const FArguments& InArgs)
CompilerResultsLog: Info ^
CompilerResultsLog: Info /Users/Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.cpp:16:1: error: unknown type name 'END_SLATE_FUNCTION_BUILD_OPTIMIZATION'
CompilerResultsLog: Info END_SLATE_FUNCTION_BUILD_OPTIMIZATION
CompilerResultsLog: Info ^
CompilerResultsLog: Info /Users/Andrew.Porter/Documents/Unreal Projects/newCode/Source/newCode/SMyCompoundWidget.cpp:16:38: error: expected unqualified-id
CompilerResultsLog: Info END_SLATE_FUNCTION_BUILD_OPTIMIZATION
CompilerResultsLog: Info ^
CompilerResultsLog: Info 8 errors generated.

Steps to Reproduce

1. Open UE4Editor.exe
2. Create a new code project
3. Once in editor, File > add code to project
4. Select Slate Widget at the bottom of the lest
5. Select Next then Create Class

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-8578 in the post.

0
Login to Vote

Fixed
ComponentUE - Foundation - Core
Affects Versions4.7
Target Fix4.8
Fix Commit2481488
CreatedJan 28, 2015
ResolvedMar 17, 2015
UpdatedFeb 5, 2017