Hello and goodnight;
I have spent some time studying and utilizing Unreal 4, and now I am trying to work with Slate Widgets, however, I cannot proceed because the Unreal Editor continues to fail on creating the class.
I am trying to add it by following these steps:
->File->Add Code To Project;
->Choose “Slate Widget”;
->Give the class a name, ANY UNUSED name, don’t touch the PATH;
->Click “CREATE”
I then get a error message window saying:
"Failed to add class MyCompoundWidget. Failed to automatically hot reload the 'ProgrammingGuide' module."
The previous windows now says:
"The name MyCompoundWidget is already used by another class."
Upon further investigation, Unreal does create the files, however, it fails to compile them, here is a small log:
Info Performing 2 actions (4 in parallel)
Info SMyCompoundWidget.cpp
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(9) : error C2504: 'SCompoundWidget' : base class undefined
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(12) : error C4183: 'SLATE_BEGIN_ARGS': missing return type; assumed to be a member function returning 'int'
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(16) : error C2144: syntax error : 'void' should be preceded by ';'
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(16) : error C4183: 'SLATE_END_ARGS': missing return type; assumed to be a member function returning 'int'
Error d:\workspace\unrealeditor\programmingguide\source\programmingguide\SMyCompoundWidget.h(16) : error C2143: syntax error : missing ',' before '&'
Error D:\Workspace\UnrealEditor\ProgrammingGuide\Source\ProgrammingGuide\SMyCompoundWidget.cpp(7) : error C2144: syntax error : 'void' should be preceded by ';'
Error D:\Workspace\UnrealEditor\ProgrammingGuide\Source\ProgrammingGuide\SMyCompoundWidget.cpp(7) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error D:\Workspace\UnrealEditor\ProgrammingGuide\Source\ProgrammingGuide\SMyCompoundWidget.cpp(7) : error C2143: syntax error : missing ',' before '&'
Error D:\Workspace\UnrealEditor\ProgrammingGuide\Source\ProgrammingGuide\SMyCompoundWidget.cpp(17) : fatal error C1004: unexpected end-of-file found
Info -------- End Detailed Actions Stats -----------------------------------------------------------
Info ERROR: UBT ERROR: Failed to produce item: D:\Workspace\UnrealEditor\ProgrammingGuide\Binaries\Win64\UE4Editor-ProgrammingGuide-6704.dll
Info Cumulative action seconds (8 processors): 0.00 building projects, 0.10 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
Info UBT execution time: 3.68 seconds
I have tried editing my “.Build.cs” to include the Slate and SlateCore to the project, but still, makes no difference…
I am assuming I have a linking problem, so yeah, if anyone has idea, he/she is very welcome to guess whats wrong!
My System:
Microsoft Windows 8.1 PRO w/ media center (x64);
Unreal Editor 4.7.5 build 4.7.5-2503383+++depot+UE4-Releases+4.7;
Microsoft Visual Studio 2013 Ultimate (x64) *even though it was not used to build the files;
Specs:
AMD FX-9590 4.7-5.0Ghz Octa-Core;
Asus AMD/ATI Radeon R9 290X 4GB GDDR5;
32gb 2400Mhz Corsair Dominator DDR3 RAM;
Generic 3TB 7200RPM HDD;
ANY HELP IS APPRECIATED!