Packaging Linker error LNK2019
Detailed description of issue When packaging a project derived from the current July 2020 code merge with additional compiled plugins ( Autosettings and AdvancedSessions ) a linking error occurs. Affects all build targets equally.
Steps To Reproduce: 1: Add blank MyClass C++ Class ( to allow plugins to build ) 2: Build the code in VS (using 2017 community ) to generate buildtargets 3: Attempt to package for Win X64 - any target
Expected Results: Completed build executable and dll in build target directory.
Actual Results: Error LNK2019 unresolved external symbol "protected: float __cdecl ABaseCharacter::GetSpeed(void)const " (?GetSpeed@ABaseCharacter@@IEBAMXZ) referenced in function "public: static void __cdecl ABaseCharacter::execGetSpeed(class UObject *,struct FFrame &,void * const)" (?execGetSpeed@ABaseCharacter@@SAXPEAVUObject@@AEAUFFrame@@QEAX@Z) Intermediate\ProjectFiles\BaseCharacter.gen.cpp.obj 1 And Error LNK1120 1 unresolved externals \Binaries\Win64\ALSReplicated.exe 1
FIX ? Traced the error to the declaration of ABaseCharacter::GetSpeed in the file \Source\ALSReplicated\Public\Characters\BaseCharacter.h FORCEINLINE float GetSpeed() const; on line 77
Removing the FORCEINLINE directive prevents the linking error and the project compiles successfully suggesting that the call to GetCharacterMovement needs to be linked externally.