FMotionEvent and GetGravity variables problem

The aim is to get value of FMotionEvent.GetGravity(), but it doesn’t compile.

I also tried to only make an object (with “FMotionEvent object;”) and the project doesn’t compile. I get these errors:

error LNK2001: unresolved external symbol "public: virtual bool __cdecl FInputEvent::IsPointerEvent(void)const " (?IsPointerEvent@FInputEvent@@UEBA_NXZ)

error LNK2001: unresolved external symbol "public: virtual class FText __cdecl FInputEvent::ToText(void)const " (?ToText@FInputEvent@@UEBA?AVFText@@XZ)

I know how to do this in BP (GetGravity node), but how can I make the same in C++?

I would be grateful for any hints.