How to define a static variable in a C++ class?

In the header, just declare it without assigning a value:

static float PI;

then in cpp file initialize it:

// don't add static keyword here
float UMyBlueprintFunctionLibrary::PI = 3.14;