Linking Static Mesh From Blueprint "Pointer to incomplete class type"

So if I put this in the header of an actor:

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Linked Static Mesh", meta = (AllowPrivateAccess = "true")) class UStaticMesh* templatePieceMeshOnly;

Then inside the blueprint for the actor I’m able to choose a static mesh. That all works but when I attempt to use it in C++ I get an error “Pointer to incomplete class type not allowed”. Is there another step I’m missing?

you need to include the staticmeshcomponent header in your cpp file

Thanks, I’m an idiot :). I actually have StaticMeshComponent.h included but not StaticMesh.h. If you post an answer I can select it as the correct.