First of all C++ is a complete mystery to me, so I followed this article to get a global data storage for my project:
The code was simply copy-pasted, but the project-related “thing” (don’t even know what that is, a namespace probably) that was #include “Solus.h” in the article.
I get tons of errors on compilation:
sultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : error C2079: 'USolusDataSingletonLibrary' uses undefined class 'SOLUS_API'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : error C2143: syntax error: missing ';' before ':'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : error C2059: syntax error: ':'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : error C2059: syntax error: 'public'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(21) : error C2143: syntax error: missing ';' before '{'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(21) : error C2447: '{': missing function header (old-style formal list?)
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(16) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(16) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(18) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(18) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(18) : error C3861: 'StaticClass': identifier not found
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(18) : error C2065: 'execGetSolusData': undeclared identifier
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2923: 'TClassCompiledInDefer': 'USolusDataSingletonLibrary' is not a valid template type argument for parameter 'TClass'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : note: see declaration of 'USolusDataSingletonLibrary'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2514: 'TClassCompiledInDefer': class has no constructors
CompilerResultsLog:Error: Error c:\program files\epic games\4.10\engine\source\runtime\coreuobject\public\uobject\UObjectBase.h(313) : note: see declaration of 'TClassCompiledInDefer'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2065: 'StaticClassFlags': undeclared identifier
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2672: 'GetPrivateStaticClassBody': no matching overloaded function found
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(20) : error C2974: 'GetPrivateStaticClassBody': invalid template argument for 'TClass', type expected
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(2387) : note: see declaration of 'GetPrivateStaticClassBody'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(99) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(99) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(99) : error C3861: 'StaticClass': identifier not found
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(108) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(108) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(108) : error C3861: 'StaticClass': identifier not found
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(130) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(130) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(130) : error C2365: 'USolusDataSingletonLibrary': redefinition; previous definition was 'data variable'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public/SolusDataSingletonLibrary.h(20) : note: see declaration of 'USolusDataSingletonLibrary'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Intermediate\Build\Win64\UE4Editor\Inc\Summon\Summon.generated.cpp(130) : error C2550: 'USolusDataSingletonLibrary': constructor initializer lists are only allowed on constructor definitions
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(20) : error C2079: 'USolusDataSingletonLibrary' uses undefined class 'SOLUS_API'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(20) : error C2143: syntax error: missing ';' before ':'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(20) : error C2059: syntax error: ':'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(20) : error C2059: syntax error: 'public'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(21) : error C2143: syntax error: missing ';' before '{'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(21) : error C2447: '{': missing function header (old-style formal list?)
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(12) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(12) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(13) : error C2365: 'USolusDataSingletonLibrary': redefinition; previous definition was 'data variable'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Public\SolusDataSingletonLibrary.h(20) : note: see declaration of 'USolusDataSingletonLibrary'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(14) : error C2550: 'USolusDataSingletonLibrary': constructor initializer lists are only allowed on constructor definitions
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(18) : error C2825: 'USolusDataSingletonLibrary': must be a class or namespace when followed by '::'
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingletonLibrary.cpp(18) : error C2510: 'USolusDataSingletonLibrary': left of '::' must be a class/struct/union
CompilerResultsLog:Error: Error C:\Users\Jorge\Documents\Unreal Projects\Summon\Source\Summon\Private\SolusDataSingleton.cpp(11) : error C2065: 'SolusEssentialVector': undeclared identifier
Would be really glad on any help =)