4.7.5 Plugin creation errors

Hi,

I am new to the forum and I am trying to learn to create plugins and am following these two tutorials exactly:

Unreal Engine 4 Plugin Tutorial Redone - Ep 1

Unreal Engine 4 Plugin Tutorial Basic Functionality & Plugin Distribution - Ep 2

The first tutorial ends up working fine, but when I add the Character class in the second tutorial I get a ton of errors. I think it might have something to do with the generated.h file but I am not sure. The errors I get are listed below…can anyone help? Thanks in advance!

Errors:

1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\AI/Navigation/NavigationTypes.h(403): error C2146: syntax error : missing ‘;’ before identifier ‘NavigationDataClassName’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\AI/Navigation/NavigationTypes.h(403): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\AI/Navigation/NavAgentInterface.h(13): error C2504: ‘UInterface’ : base class undefined
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\AI/Navigation/NavAgentInterface.h(14): error C2146: syntax error : missing ‘;’ before identifier ‘Super’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\AI/Navigation/NavAgentInterface.h(14): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(81): error C2065: ‘USceneComponent’ : undeclared identifier
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(81): error C2059: syntax error : ‘,’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(81): error C2976: ‘TMap’ : too few template arguments
1> D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Core\Public\Containers\Map.h(846) : see declaration of ‘TMap’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(62): error C2512: ‘TMap’ : no appropriate default constructor available
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(304): error C2143: syntax error : missing ‘;’ before ‘<’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(304): error C2913: explicit specialization; ‘TStructOpsTypeTraits’ is not a specialization of a class template
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(304): error C2059: syntax error : ‘<’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(304): error C2059: syntax error : ‘public’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(305): error C2143: syntax error : missing ‘;’ before ‘{’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(305): error C2447: ‘{’ : missing function header (old-style formal list?)
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(342): error C2913: explicit specialization; ‘TStructOpsTypeTraits’ is not a specialization of a class template
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(375): error C2913: explicit specialization; ‘TStructOpsTypeTraits’ is not a specialization of a class template
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(406): error C2913: explicit specialization; ‘TStructOpsTypeTraits’ is not a specialization of a class template
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2039: ‘WithNoInitConstructor’ : is not a member of ‘TStructOpsTypeTraits’
1> D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(498) : see declaration of ‘TStructOpsTypeTraits’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2065: ‘WithNoInitConstructor’ : undeclared identifier
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2975: ‘Predicate’ : invalid template argument for ‘TEnableIf’, expected compile-time constant expression
1> d:\program files\epic games\4.7\engine\source\runtime\core\public\Templates/EnableIf.h(18) : see declaration of ‘Predicate’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2039: ‘Type’ : is not a member of ‘TEnableIf’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2146: syntax error : missing ‘;’ before identifier ‘ConstructWithNoInitOrNot’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C2433: ‘Type’ : ‘__forceinline’ not permitted on data declarations
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(514): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2039: ‘WithNoInitConstructor’ : is not a member of ‘TStructOpsTypeTraits’
1> D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(498) : see declaration of ‘TStructOpsTypeTraits’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2065: ‘WithNoInitConstructor’ : undeclared identifier
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2975: ‘Predicate’ : invalid template argument for ‘TEnableIf’, expected compile-time constant expression
1> d:\program files\epic games\4.7\engine\source\runtime\core\public\Templates/EnableIf.h(18) : see declaration of ‘Predicate’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2039: ‘Type’ : is not a member of ‘TEnableIf’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2146: syntax error : missing ‘;’ before identifier ‘ConstructWithNoInitOrNot’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2433: ‘Type’ : ‘__forceinline’ not permitted on data declarations
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(517): error C2374: ‘Type’ : redefinition; multiple initialization
1> D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(511) : see declaration of ‘Type’
1>D:\Program Files\Epic Games\4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(520): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Hi

I used the same tutorial and it worked fine.
Perhaps check your code against the source?

Hi, thanks for the response and the link! I replaced my plugin folder with the source and it worked fine! I must have missed something along the way…I will look closer. Thanks so much for your help!

Ah sweet, glad it helped. I used the same example to extend the Actor class. Good luck!