Compiler Error When updating 4.10 to 4.12: Unresolved External Symbol

I tried to update my project from 4.10 to 4.12 and i’m not being able to compile it. The error is this one:

Creating library D:\UnrealProjects\BattleSubs\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BattleSubs.lib and object D:\UnrealProjects\BattleSubs\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BattleSubs.exp
2>BattleSubs.generated.cpp.obj : error LNK2019: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z) referenced in function “class UFunction * __cdecl Z_Construct_UFunction_ABattleSubsHud_HideSplashScreen(void)” (?Z_Construct_UFunction_ABattleSubsHud_HideSplashScreen@@YAPEAVUFunction@@anonymous_user_9674a66c)
2>BTService_AdmiralUpdateQueue.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>BTTask_AdmiralSpawnMedal.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>BTTask_AdmiralSpawnPowerup.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>BTTask_AdmiralSpawnSubmarine.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>BTService_AdmiralUpdateQueue.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskDeactivated(class UGameplayTask &)” (?OnGameplayTaskDeactivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>BattleSubs.generated.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskDeactivated(class UGameplayTask &)” (?OnGameplayTaskDeactivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>D:\UnrealProjects\BattleSubs\Binaries\Win64\UE4Editor-BattleSubs.dll : fatal error LNK1120: 2 unresolved externals
2>ERROR : UBT error : Failed to produce item: D:\UnrealProjects\BattleSubs\Binaries\Win64\UE4Editor-BattleSubs.dll
2> Total build time: 53.01 seconds
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3075: The command ““C:\Program Files (x86)\Epic Games\4.12\Engine\Build\BatchFiles\Build.bat” BattleSubsEditor Win64 Development “D:\UnrealProjects\BattleSubs\BattleSubs.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.

I tried analyzing class by class for example:
“2>BattleSubs.generated.cpp.obj : error LNK2019: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z) referenced in function “class UFunction * __cdecl Z_Construct_UFunction_ABattleSubsHud_HideSplashScreen(void)” (?Z_Construct_UFunction_ABattleSubsHud_HideSplashScreen@@YAPEAVUFunction@@anonymous_user_9674a66c)”

UFunction_ABattleSubsHud_HideSplashScreen(void) Is being declared like this on my .h file
/** Function called to hide splash screen created by other huds.*/
UFUNCTION(BlueprintNativeEvent, Category = “Submarine”)
void HideSplashScreen();
virtual void HideSplashScreen_Implementation();

And in the .Cpp file its declared like this only
void ABattleSubsHud::HideSplashScreen_Implementation()
{
//Any Parent Logic Here
}

I’m i missing something? Or was this an issue that ocurred after updating the project some links got broken?

Hi LuLima,

I believe you inherited IGameplayTaskOwnerInterface to some class which calls the virtual function OnGameplayTaskActivated which doesn’t appear to be implemented as that was implemented in 4.13 and not available in 4.12.

Hope that helps. Cheers,

Yeah, but i don’t even know what that is ^^. I mean, i use a base BTService or Task…

Well it seems that you need to add a GameplayTasks in my game.Build.cs file inside the PublicDependencyModuleNames section.

Pretty weird, but it seems to solve the compiling error