Error LINK2019: unresolved external symbol when packaging, not when compiling

Greetings, I’m not sure why I’m getting these errors when building. The game code compiles correctly and runs good in editor, but when I try packaging, I get these error messages:

VRPawn.cpp.obj : error LNK2019: unresolved external symbol "public: short * __cdecl AVRPlayerController::GetFingerData(void)" (?GetFingerData@AVRPlayerController@@QEAAPEAFXZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)
VRPawn.cpp.obj : error LNK2019: unresolved external symbol "public: float * __cdecl AVRPlayerController::GetGyroData(void)" (?GetGyroData@AVRPlayerController@@QEAAPEAMXZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)
error LNK2019: unresolved external symbol "public: class FSerialPortHandler * __cdecl AVRPlayerController::GetSerialPort(void)" (?GetSerialPort@AVRPlayerController@@QEAAPEAVFSerialPortHandler@@XZ) referenced in function "public: virtual void __cdecl AVRPawn::Tick(float)" (?Tick@AVRPawn@@UEAAXM@Z)

In the Pawn class I’m trying to get a pointer to an array from the Controller class

//Controller class functions to get data
int16_t* AVRPlayerController::GetFingerData()
{
	return this->FingerData;
}
float* AVRPlayerController::GetGyroData()
{
	return this->GyroData;
}
// Return pointer to FSerialPortHandler object
FSerialPortHandler* AVRPlayerController::GetSerialPort()
{
	return Teensy;
}

Then again trying to get the data in the Pawn class

ThisController = Cast<AVRPlayerController>(GetController());
FingerData = ThisController->GetFingerData();
GyroData = ThisController->GetGyroData();

where all variables are of the required type. As stated above, everything compiles and runs correctly. I would appreciate if somebody could help me, why the game won’t build.

Try renaming the binaries folder, forcing the compiler to generate all files new

Tried it now, but I’m still getting the same error.

Can you try the same with the Intermediate folder?

I’m still getting the same error.