x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Plugin source with c++ actor error during build

Hi

I'm trying to create a basic plugin which can spawn an actor into the level on clicking a button in the editor UI. I really can't get my head around what I'm doing wrong, hopefully it's just a noob problem? So I've tried to recreate this issue below so that I can better describe the problem I'm having, this is my process:

  1. Create a new blank c++ project called PluginError

  2. Using the plugin wizard, create a new Editor Mode Plugin called TestPlugin, restart the editor

  3. In the content browser, create a new c++ class called MyActor with Actor as the parent class,

  4. So that the plugin can be independent of the project, I have to move the actor files to the plugin folder so:

  5. Close the editor, close Visual Studio

  6. In the project source, find the .cpp and .h files of the actor, and move them to the plugin source folders Private and Public respectively

  7. Generate the projects Visual Studio files by right clicking on the .uproject

  8. Open up the solution in Visual Studio to modify the actor files.

  9. In MyActor.cpp we have to add #include "TestPluginPrivatePCH.h" at the top of the includes

  10. The second include in MyActor.cpp is the project header, which is not in scope since we moved MyActor.cpp, so replace it with "Engine.h" seen as that is the only thing in the project header at the moment anyway

  11. In MyActor.h I have to change the class API PLUGINERROR_API to the correct module, which I assume is TESTPLUGIN_API (https://answers.unrealengine.com/questions/25049/what-does-coreuobject-api-macro.html)

In my mind this should now compile. Obviously there's no functionality at the moment other than the default plugin from the wizard, but I still get a host of errors when I try to rebuild the solution:

 1>------ Rebuild All started: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
 2>------ Rebuild All started: Project: PluginError, Configuration: Development_Editor x64 ------
 2>  Cleaning PluginErrorEditor Binaries...
 2>  Creating makefile for PluginErrorEditor (no existing makefile)
 2>  Performing full C++ include scan (no include cache file)
 2>  Parsing headers for PluginErrorEditor
 2>    Running UnrealHeaderTool "H:\Users\Jonathan\Documents\Unreal Projects\PluginError\PluginError.uproject" "H:\Users\Jonathan\Documents\Unreal Projects\PluginError\Intermediate\Build\Win64\PluginErrorEditor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -rocket -installed
 2>  Reflection code generated for PluginErrorEditor in 6.951504 seconds
 2>  Performing 16 actions (4 in parallel)
 2>  [3/16] Resource PCLaunch.rc
 2>  [4/16] Resource ModuleVersionResource.rc.inl
 2>  PCH.PluginError.h.cpp
 2>  PCH.TestPluginPrivatePCH.h.cpp
 2>  [5/16] Resource PCLaunch.rc
 2>  [6/16] Resource ModuleVersionResource.rc.inl
 2>  TestPluginEdMode.cpp
 2>  TestPlugin.cpp
 2>  MyActor.cpp
 2>  TestPluginEdModeToolkit.cpp
 2>  TestPlugin.generated.cpp
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(39): error C2027: use of undefined type 'UObject'
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Public\Misc\Guid.h(6): note: see declaration of 'UObject'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(39): error C2227: left of '->GetClass' must point to class/struct/union/generic type
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(84): error C2065: 'USceneComponent': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(84): error C2059: syntax error: ','
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(84): error C2976: 'TMap': too few template arguments
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Public\Containers\Map.h(859): note: see declaration of 'TMap'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\ComponentInstanceDataCache.h(63): error C2512: 'TMap': no appropriate default constructor available
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Core\Public\Containers\Map.h(859): note: see declaration of 'TMap'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(334): error C2988: unrecognizable template declaration/definition
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(334): error C2143: syntax error: missing ';' before '<'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(334): error C2913: explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(334): error C2059: syntax error: '<'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(334): error C2059: syntax error: 'public'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(335): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(335): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(372): error C2913: explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(405): error C2913: explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\Engine\Classes\Engine/EngineBaseTypes.h(436): error C2913: explicit specialization; 'TStructOpsTypeTraits' is not a specialization of a class template
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): error C2065: 'WithNoInitConstructor': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): error C2061: syntax error: identifier 'ConstructWithNoInitOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(534): error C2065: 'WithNoInitConstructor': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(534): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(535): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(535): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C2065: 'WithSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(544): error C2061: syntax error: identifier 'SerializeOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(550): error C2065: 'WithSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(550): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(551): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(551): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C2065: 'WithPostSerialize': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(560): error C2061: syntax error: identifier 'PostSerializeOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(565): error C2065: 'WithPostSerialize': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(565): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(566): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(566): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C2065: 'WithNetSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(575): error C2061: syntax error: identifier 'NetSerializeOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(581): error C2065: 'WithNetSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(581): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(582): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(582): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C2065: 'WithNetDeltaSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(591): error C2061: syntax error: identifier 'NetDeltaSerializeOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(597): error C2065: 'WithNetDeltaSerializer': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(597): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(598): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(598): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C2065: 'WithCopy': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(607): error C2061: syntax error: identifier 'CopyOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(613): error C2065: 'WithCopy': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(613): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(614): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(614): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C2065: 'WithAddStructReferencedObjects': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(628): error C2061: syntax error: identifier 'AddStructReferencedObjectsOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(633): error C2065: 'WithAddStructReferencedObjects': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(633): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(634): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(634): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2065: 'WithIdentical': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2065: 'WithIdenticalViaEquality': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(643): error C2061: syntax error: identifier 'IdenticalOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(649): error C2065: 'WithIdentical': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(649): error C2065: 'WithIdenticalViaEquality': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(649): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(650): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(650): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2065: 'WithIdentical': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2065: 'WithIdenticalViaEquality': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2433: 'Type': '__forceinline' not permitted on data declarations
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2374: 'Type': redefinition; multiple initialization
 2>  H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(528): note: see declaration of 'Type'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(656): error C2061: syntax error: identifier 'IdenticalOrNot'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(663): error C2065: 'WithIdentical': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(663): error C2065: 'WithIdenticalViaEquality': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(663): error C2975: 'Predicate': invalid template argument for 'TEnableIf', expected compile-time constant expression
 2>  h:\program files\epic games\4.10\engine\source\runtime\core\public\Templates/EnableIf.h(18): note: see declaration of 'Predicate'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(664): error C2143: syntax error: missing ';' before '{'
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(664): error C2447: '{': missing function header (old-style formal list?)
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(674): error C2065: 'WithExportTextItem': undeclared identifier
 2>H:\Program Files\Epic Games\4.10\Engine\Source\Runtime\CoreUObject\Public\UObject\Class.h(674): fatal error C1003: error count exceeds 100; stopping compilation
 2>  PluginError.cpp
 2>  PluginErrorGameMode.cpp
 2>  PluginError.generated.cpp
 2>  [15/16] Link UE4Editor-PluginError.dll
 2>     Creating library H:\Users\Jonathan\Documents\Unreal Projects\PluginError\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-PluginError.lib and object H:\Users\Jonathan\Documents\Unreal Projects\PluginError\Intermediate/Build/Win64\UE4Editor\Development\UE4Editor-PluginError.exp
 




Product Version: UE 4.8
Tags:
more ▼

asked Feb 26 '16 at 06:37 PM in C++ Programming

avatar image

Jayae
52 12 18 25

avatar image Shadowriver Feb 26 '16 at 11:49 PM

You tried rebuilding?

avatar image Jayae Feb 27 '16 at 12:20 PM

Thanks for taking a look. I've just tried regenerating the visual studio files and rebuilding the entire solution (engine and project) from within VS and I get the same errors.

There's nothing else in my solution other than what I wrote above so this has completely stumped me! It rebuilds fine up until point 4, but I really need to keep the actor with the plugin source code (right?) so that I can package up my plugin one day...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

VS solution is meaningless for UBT it build based on what is in forders rether then VS solution, check what you got in forders. I kind of think this is where there might be your issue, other then that it looks like some UHT junk issue, as error is in generated files, thats why i asked if you rebuild it, if rebuilding does not work try deleting Intermediate forder in project directory,

Or this might be also some inproper include. You said you place Engine.h in some file, Engine.h should be included in TestPluginPrivatePCH.h as a first include + if you include something else from engine it Engine.h is sometimes ingerented from there

more ▼

answered Feb 27 '16 at 07:58 PM

avatar image

Shadowriver
35.7k 926 168 1104

avatar image Jayae Feb 29 '16 at 11:03 AM

Hey, thanks! :)

Deleting Intermediate didn't have an effect.

I took a closer look at the includes and TestPluginPrivatePCH.h didn't include Engine.h. I added it there and removed it from MyActor.cpp (where I had added it) and got a successful build!!

Thanks for your help

avatar image fargese Jun 09 '16 at 09:32 AM

It solved for me adding Engine.h header file in PCH plugin headers.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question