Just in case someone else got here in 2024 as myself.
I got this error after trying to
GEngine->AddOnScreenDebugMessage(-1, 8.f, FColor::Red, TEXT(“Message”));
Without adding GEngine library.
Which led me to conclude that some functionalities are recognised by the compiler because i had been able to compile this, but are not handled by UE itself.
Add the library or use some other functions