Download

TArray Error error LNK2001: unresolved external symbol

Why does using the Tarray in ths manner make this error? How Do i fix it?
error LNK2001: unresolved external symbol

<header>
TArray <class AWeaponBase*> InventoryList;

Creating library D:\Users\Robert\Documents\Unreal Projects\darkstorm\Intermediate\Build\Win64\darkstormEditor\Development\UE4Editor-darkstorm.lib and object D:\Users\Robert\Documents\Unreal Projects\darkstorm\Intermediate\Build\Win64\darkstormEditor\Development\UE4Editor-darkstorm.exp
1>darkstormCharacter.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl AdarkstormCharacter::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@AdarkstormCharacter@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z)
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Binaries\Win64\UE4Editor-darkstorm.dll : fatal error LNK1120: 1 unresolved externals

Need you to post more code to see what the problem is.

It looks like you’ve tried to replicate something and not invoked the GetLifetimeReplicatedProps function - or you’ve redeclared it when you don’t need to.

It seems as though you forgot to include:


#include "UnrealNetwork.h

in a file where you are overriding GetLifetimeReplicatedProps(…)

I Have encountered this nasty error! ​​
I have my CustomPS inherited from APlayerStart and tried to add a constructor for this class but it is not possible in this case.
The first time it compiled with the constructor in the header but then it does not!

So in your case, it could be something else, but it is impossible for it. best way to track it is to use GIT and compile your code and make commits to make a faster progress [HR][/HR]
My SOLUTION[only for APlayerStart] was to delete constructor declaration in HEADER file (And in CPP if you have it);