Cant compile project with ADestructibleActor after upgrade from 4.8 to 4.9

After upgrading my project from 4.8 to 4.9 the project no longer compiles. This is the messages I get:

Error	1	error LNK2019: unresolved external symbol "public: virtual void __cdecl ADestructibleActor::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ADestructibleActor@@UEAAXAEAUFPropertyChangedEvent@@@Z) referenced in function "public: virtual void __cdecl ACubeDestructableCube::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ACubeDestructableCube@@UEAAXAEAUFPropertyChangedEvent@@@Z)

Error	2	error LNK2019: unresolved external symbol "public: virtual void __cdecl ADestructibleActor::PostLoad(void)" (?PostLoad@ADestructibleActor@@UEAAXXZ) referenced in function "public: virtual void __cdecl ACubeDestructableCube::PostLoad(void)" (?PostLoad@ACubeDestructableCube@@UEAAXXZ)	

The conclutions that i have come to is that this has something to do with my class which inherits from ADestructibleActor and that the functions causing the link errors should be flagged with ENGINE_API in the DestructibleActor.h.

But I haven’t compiled the engine code from scratch.

Do I really need to compile the engine source code from scratch to be able to create a class that inherits ADestructibleActor?

Related questions:

Uhm ok yeah so I solved it by changing the class that inherited from ADestructibleActor to instead inherit from AActor.

After that the only two things I needed to do was to

  1. Add a UProperty for the destructable component, since AActor doesn’t have stuff like that:

    UPROPERTY(EditInstanceOnly, BlueprintReadWrite, Category = "Behavior")
    UDestructibleComponent* MyDestructibleComponent;
    
  2. Remove usages of GetDestructibleComponent() to get the destructable component and just use the property.
    No initialization is needed for MyDestructibleComponent since it is set from the editor.