Download

Errors when trying to include ObjectTools.h

Whenever I try to include ObjectTools.h

UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(410): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(410): error C2143: syntax error : missing ‘,’ before ‘*’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(419): error C2065: ‘UFactory’ : undeclared identifier
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(419): error C2059: syntax error : ‘>’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(419): error C2976: ‘TArray’ : too few template arguments
UnrealEngine-4.9\Engine\Source\Runtime\Core\Public\Containers\Array.h(383) : see declaration of ‘TArray’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(419): error C2976: ‘TMultiMap’ : too few template arguments
UnrealEngine-4.9\Engine\Source\Runtime\Core\Public\Containers\Map.h(953) : see declaration of ‘TMultiMap’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2065: ‘UFactory’ : undeclared identifier
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2065: ‘InFactory’ : undeclared identifier
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2065: ‘out_Filetypes’ : undeclared identifier
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2275: ‘FString’ : illegal use of this type as an expression
UnrealEngine-4.9\Engine\Source\Runtime\Core\Public\Containers\UnrealString.h(47) : see declaration of ‘FString’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2065: ‘out_Extensions’ : undeclared identifier
UnrealEngine-4.9\Engine\Source\Runtime\Core\Public\Containers\UnrealString.h(47) : see declaration of ‘FString’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2182: ‘AppendFactoryFileExtensions’ : illegal use of type ‘void’
UnrealEngine-4.9\Engine\Source\Editor\UnrealEd\Public\ObjectTools.h(424): error C2491: ‘ObjectTools::AppendFactoryFileExtensions’ : definition of dllimport data not allowed

Pretty much anything I call from it after I include it causes it to throw an error, even though the engine builds fine on its own.

Did you include UnrealEd.h before including ObjectTools.h? And is UnrealEd specified in PrivateDependencyModuleNames in your .Build.cs?