Hi, unreal gurus,
I just found a weird problem with my UE4.16.1 env.
The plugin swipe can be place into <UE4 Source>/Engine/Plugins directory,
after a GenerateFiles.sh, it can be compiled fine during “make.” Then the plugin can be enable in UE4 editor without any problem.
And it works in the test play mode.
But unfortunately, when I want to build the project for a certain target platform, the plugin suddenly cannot be compiled with errors like these:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:2:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/Swipe.cpp:6:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/SwipePrivatePCH.h:15:
In file included from ../Plugins/Swipe/Intermediate/Build/Linux
B4D820EA/IntuitiveMeleeCombat/Inc/Swipe/SwipeClasses.h:13:
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h23:37: error: unknown class name 'UGameViewportClient'; did
you mean 'USwipeViewportClient'?
class USwipeViewportClient : public UGameViewportClient {
^~~~~~~~~~~~~~~~~~~
USwipeViewportClient
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: 'USwipeViewportClient' declared here
class USwipeViewportClient : public UGameViewportClient {
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:37: error: base class has incomplete type
class USwipeViewportClient : public UGameViewportClient {
~~~~~~~^~~~~~~~~~~~~~~~~~~
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: definition of 'USwipeViewportClient' is not complete
until the closing '}'
class USwipeViewportClient : public UGameViewportClient {
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
24:2: error: unknown type name 'UGameViewportClient'; did you
mean 'USwipeViewportClient'?
GENERATED_BODY()
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:612:29:
note: expanded from macro 'GENERATED_BODY'
#define GENERATED_BODY(...)
BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,
GENERATED_BODY)
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37:
note: expanded from macro 'BODY_MACRO_COMBINE'
#define BODY_MACRO_COMBINE(A,B,C,D)
BODY_MACRO_COMBINE_INNER(A,B,C,D)^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:608:43:
note: expanded from macro 'BODY_MACRO_COMBINE_INNER'
#define BODY_MACRO_COMBINE_INNER(A,B,C,D)
A##B##C##D
^
<scratch space>:28:1: note: expanded from here
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpor
Client_h_24_GENERATED_BODY
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe
SwipeViewportClient.generated.h:102:2: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_GENERATED_BODY'
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeVi
wportClient_h_24_INCLASS_NO_PURE_DECLS \
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe
SwipeViewportClient.generated.h:43:38: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_INCLASS_NO_PURE_DECLS'
DECLARE_CLASS(USwipeViewportClient,
UGameViewportClient, COMPILED_IN_FLAGS(0 |
CLASS_Transient), 0, TEXT("/Script/Swipe"), NO_API) \
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: 'USwipeViewportClient' declared here
class USwipeViewportClient : public UGameViewportClient {
^../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
27:26: error: unknown type name 'FViewport'
virtual bool InputTouch(FViewport* Viewport,
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
30:3: error: use of undeclared identifier 'ETouchType'
ETouchType::Type Type,
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:6:
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:10:39: error: unknown
type name 'FViewport'
bool USwipeViewportClient::InputTouch(FViewport* InViewport,
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:18:6: error: use of
undeclared identifier 'IgnoreInput'
if (IgnoreInput())
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:121:6: error: unknown
type name 'FTimerDelegate'; did you mean 'FSimpleDelegate'?
FTimerDelegate TapHandlerDelegate;
^~~~~~~~~~~~~~
FSimpleDelegate
Runtime/Core/Public/Delegates/Delegate.h:440:19: note:
'FSimpleDelegate' declared here
DECLARE_DELEGATE( FSimpleDelegate );
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EAIntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:6:
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:123:22: error: use of
undeclared identifier 'GetWorld'
UWorld* World = GetWorld();
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:126:12: error: member
access into incomplete type 'UWorld'
World
>GetTimerManager().SetTimer(TapHandler, TapHandlerDelegate,
SwipeSettings->MaxTimeBetweenTaps, false);
^
Runtime/Core/Public/GenericPlatform/GenericPlatformMisc.h
865:25: note: forward declaration of 'UWorld'
static bool Exec(class UWorld* InWorld, const TCHAR*
Cmd, FOutputDevice& Out)
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:6:
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:150:6: error: use of
undeclared identifier 'GEngine'
if (GEngine->GameViewport)
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:152:44: error: use of
undeclared identifier 'GEngine'
const FVector2D ViewportSize = FVector2D(GEngine
>GameViewport->Viewport->GetSizeXY());
^
In file included from /home/sbbg/Shared/UnrealEngine/EnginePlugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:2:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/Swipe.cpp:6:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/SwipePrivatePCH.h:8:
In file included from ../Plugins/Swipe/Source/Swipe/Public
ISwipe.h:8:
In file included from Runtime/Core/Public/Modules
ModuleManager.h:13:
In file included from Runtime/Core/Public/Delegates/Delegate.h
420:
Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:669:2:
error: static_assert failed "You cannot use UObject method
delegates with raw pointers."
static_assert(TPointerIsConvertibleFromTo<UserClass,
const UObjectBase>::Value, "You cannot use UObject method
delegates with raw pointers.");
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~
Runtime/Core/Public/Delegates/DelegateInstancesImpl.h
834:105: note: in instantiation of template class
'TBaseUObjectMethodDelegateInstance<false,
USwipeViewportClient, TTypeWrapper<void> ()>' requested here
class TBaseUObjectMethodDelegateInstance<bConst,
UserClass, void (ParamTypes...), VarTypes...> : public
TBaseUObjectMethodDelegateInstance<bConst, UserClass,
TTypeWrapper<void> (ParamTypes...), VarTypes...>
^
Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl:281:3:
note: in instantiation of template class
'TBaseUObjectMethodDelegateInstance<false,USwipeViewportClient, void ()>' requested here
TBaseUObjectMethodDelegateInstance<false,
UserClass, TFuncType, VarTypes...>::Create(Result,
InUserObject, InFunc, Vars...);
^
Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl
512:11: note: in instantiation of function template specialization
'TBaseDelegate<TTypeWrapper<void>>::CreateUObject<USwi
eViewportClient>' requested here
*this = CreateUObject(InUserObject, InFunc, Vars...);
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:122:25: note: in
instantiation of function template specialization
'TBaseDelegate<TTypeWrapper<void>>::BindUObject<USwipe
iewportClient>' requested here
TapHandlerDelegate.BindUObject(this,
&USwipeViewportClient::ResetTapHandler);
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:2:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/Swipe.cpp:6:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/SwipePrivatePCH.h:8:
In file included from ../Plugins/Swipe/Source/Swipe/Public
ISwipe.h:8:
In file included from Runtime/Core/Public/Modules
ModuleManager.h:13:
In file included from Runtime/Core/Public/Delegates/Delegate.h
420:
Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:845:78:error: no type named 'FMethodPtr' in
'TBaseUObjectMethodDelegateInstance<false,
USwipeViewportClient, TTypeWrapper<void> ()>'
TBaseUObjectMethodDelegateInstance(UserClass*
InUserObject, typename Super::FMethodPtr InMethodPtr,
VarTypes... Vars)
~~~~~~~~~~~~~~~~^~~
~~~~~~
Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl:281:3:
note: in instantiation of template class
'TBaseUObjectMethodDelegateInstance<false,
USwipeViewportClient, void ()>' requested here
TBaseUObjectMethodDelegateInstance<false,
UserClass, TFuncType, VarTypes...>::Create(Result,
InUserObject, InFunc, Vars...);
^
Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl
512:11: note: in instantiation of function template specialization
'TBaseDelegate<TTypeWrapper<void>>::CreateUObject<USwi
eViewportClient>' requested here
*this = CreateUObject(InUserObject, InFunc, Vars...);
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe/Source
Swipe/Private/SwipeViewportClient.cpp:122:25: note: in
instantiation of function template specialization
'TBaseDelegate<TTypeWrapper<void>>::BindUObject<USwipe
iewportClient>' requested here
TapHandlerDelegate.BindUObject(this,
&USwipeViewportClient::ResetTapHandler);
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:2:In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/Swipe.cpp:6:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/SwipePrivatePCH.h:8:
In file included from ../Plugins/Swipe/Source/Swipe/Public
ISwipe.h:8:
In file included from Runtime/Core/Public/Modules
ModuleManager.h:13:
In file included from Runtime/Core/Public/Delegates/Delegate.h
420:
Runtime/Core/Public/Delegates/DelegateInstancesImpl.h:850:15:
error: 'ExecuteIfSafe' marked 'override' but does not override any
member functions
virtual bool ExecuteIfSafe(ParamTypes... Params) const
override
^
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Development/Swipe/Module.Swipe.cpp:2:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/Swipe.cpp:6:
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Source/Swipe/Private/SwipePrivatePCH.h:15:
In file included from ../Plugins/Swipe/Intermediate/Build/Linux
B4D820EA/IntuitiveMeleeCombat/Inc/Swipe/SwipeClasses.h:13:
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
24:2: error: constructor for 'USwipeViewportClient' creates a
delegation cycle -Wdelegating-ctor-cycles]
GENERATED_BODY()
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:612:29:
note: expanded from macro 'GENERATED_BODY'
#define GENERATED_BODY(...)BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,
GENERATED_BODY)
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37:
note: expanded from macro 'BODY_MACRO_COMBINE'
#define BODY_MACRO_COMBINE(A,B,C,D)
BODY_MACRO_COMBINE_INNER(A,B,C,D)
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:608:43:
note: expanded from macro 'BODY_MACRO_COMBINE_INNER'
#define BODY_MACRO_COMBINE_INNER(A,B,C,D)
A##B##C##D
^
<scratch space>:28:1: note: expanded from here
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpor
Client_h_24_GENERATED_BODY
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe
SwipeViewportClient.generated.h:103:2: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_GENERATED_BODY'
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeVi
wportClient_h_24_ENHANCED_CONSTRUCTORS \
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe
SwipeViewportClient.generated.h:73:105: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_ENHANCED_CONSTRUCTORS'
NO_API USwipeViewportClient(const FObjectInitializer&ObjectInitializer = FObjectInitializer::Get()) :
Super(ObjectInitializer) { }; \
^
16 errors generated.
[54/325] Compile SteamVR.generated.cpp
In file included from /home/sbbg/Shared/UnrealEngine/Engine
Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe/Swipe.generated.cpp:8:
In file included from ../Plugins/Swipe/Intermediate/Build/Linux
B4D820EA/IntuitiveMeleeCombat/Inc/Swipe
Swipe.generated.dep.h:18:
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:37: error: unknown class name 'UGameViewportClient'; did
you mean 'USwipeViewportClient'?
class USwipeViewportClient : public UGameViewportClient {
^~~~~~~~~~~~~~~~~~~
USwipeViewportClient
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: 'USwipeViewportClient' declared here
class USwipeViewportClient : public UGameViewportClient {
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:37: error: base class has incomplete type
class USwipeViewportClient : public UGameViewportClient {
~~~~~~~^~~~~~~~~~~~~~~~~~~
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: definition of 'USwipeViewportClient' is not complete
until the closing '}'
class USwipeViewportClient : public UGameViewportClient {
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
24:2: error: unknown type name 'UGameViewportClient'; did you
mean 'USwipeViewportClient'?GENERATED_BODY()
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:612:29:
note: expanded from macro 'GENERATED_BODY'
#define GENERATED_BODY(...)
BODY_MACRO_COMBINE(CURRENT_FILE_ID,_,__LINE__,
GENERATED_BODY)
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:609:37:
note: expanded from macro 'BODY_MACRO_COMBINE'
#define BODY_MACRO_COMBINE(A,B,C,D)
BODY_MACRO_COMBINE_INNER(A,B,C,D)
^
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:608:43:
note: expanded from macro 'BODY_MACRO_COMBINE_INNER'
#define BODY_MACRO_COMBINE_INNER(A,B,C,D)
A##B##C##D
^
<scratch space>:67:1: note: expanded from here
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpor
Client_h_24_GENERATED_BODY
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/Swipe
SwipeViewportClient.generated.h:102:2: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_GENERATED_BODY'
Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeVi
wportClient_h_24_INCLASS_NO_PURE_DECLS \
^
../Plugins/Swipe/Intermediate/Build/Linux/B4D820EA
IntuitiveMeleeCombat/Inc/SwipeSwipeViewportClient.generated.h:43:38: note: expanded from
macro
'Engine_Plugins_Swipe_Source_Swipe_Classes_SwipeViewpo
tClient_h_24_INCLASS_NO_PURE_DECLS'
DECLARE_CLASS(USwipeViewportClient,
UGameViewportClient, COMPILED_IN_FLAGS(0 |
CLASS_Transient), 0, TEXT("/Script/Swipe"), NO_API) \
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
23:7: note: 'USwipeViewportClient' declared here
class USwipeViewportClient : public UGameViewportClient {
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
27:26: error: unknown type name 'FViewport'
virtual bool InputTouch(FViewport* Viewport,
^
../Plugins/Swipe/Source/Swipe/Classes/SwipeViewportClient.h
30:3: error: use of undeclared identifier 'ETouchType'
ETouchType::Type Type,
^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe
Intermediate/Build/Linux/B4D820EA/IntuitiveMeleeCombat/Inc
Swipe/Swipe.generated.cpp:396:2: error: no member named
'WithinClass' in 'USwipeViewportClient'
IMPLEMENT_CLASS(USwipeViewportClient, 3852037885);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:1509:14:
note: expanded from macro 'IMPLEMENT_CLASS'
&TClass::WithinClass::StaticClass \
~~~~~~~~^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe
Intermediate/Build/Linux/B4D820EA/IntuitiveMeleeCombat/IncSwipe/Swipe.generated.cpp:396:2: error: no member named
'StaticConfigName' in 'USwipeViewportClient'
IMPLEMENT_CLASS(USwipeViewportClient, 3852037885);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:1504:13:
note: expanded from macro 'IMPLEMENT_CLASS'
TClass::StaticConfigName(), \
~~~~~~~~^
/home/sbbg/Shared/UnrealEngine/Engine/Plugins/Swipe
Intermediate/Build/Linux/B4D820EA/IntuitiveMeleeCombat/Inc
Swipe/Swipe.generated.cpp:396:2: error: no member named
'AddReferencedObjects' in 'USwipeViewportClient'
IMPLEMENT_CLASS(USwipeViewportClient, 3852037885);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~
Runtime/CoreUObject/Public/UObject/ObjectMacros.h:1507:14:
note: expanded from macro 'IMPLEMENT_CLASS'
&TClass::AddReferencedObjects, \
~~~~~~~~^
I know most of them look like some include errors can be fixed by adding include statements.
But now that the GEngine definition is MIA, I know I couldn’t fix all errors by adding include statements.
Because I’m going to hit the MONOLITHIC_HEADER error stuff.
So does anyone have any idea about what could be wrong in UE4 editor making it fail to build the plugin for me?
Thank you.