Linking errors when inheriting USphereComponent

I have the following two files:

#pragma once

#include "Components/SphereComponent.h"
#include "BallSphereComponent.generated.h"

/**
 * The ball's spherical collision component. The ball gets modelled as a perfect sphere regarding collision.
 */
UCLASS()
class UBallSphereComponent : public USphereComponent
{
    GENERATED_UCLASS_BODY()
};

and

#include "MyGame.h"
#include "BallSphereComponent.h"


UBallSphereComponent::UBallSphereComponent(const class FPostConstructInitializeProperties& PCIP)
    : Super(PCIP)
{

}

Which give me the following linking errors:

BallSphereComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UShapeComponent::GetUsedMaterials(class TArray<class UMaterialInterface *,class FDefaultAllocator> &)const " (?GetUsedMaterials@UShapeComponent@@UEBAXAEAV?$TArray@PEAVUMaterialInterface@@VFDefaultAllocator@@@@@Z)

BallSphereComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual class UBodySetup * __cdecl UShapeComponent::GetBodySetup(void)" (?GetBodySetup@UShapeComponent@@UEAAPEAVUBodySetup@@XZ)

BallSphereComponent.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UShapeComponent::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@UShapeComponent@@UEAAXAEAUFPropertyChangedEvent@@@Z)

Inheriting from any other component works fine. This is in UE 4.2, and apparantly these linking errors should have been fixed? I only found one other post with this problem, but that wasof no help at all.

[cross-post from this questionHi!

I’ve checked the logs and it appears that UShapeComponent wasn’t marked as ENGINE_API until May 22nd, which looks like it just missed the 4.2 branch :frowning: The commit I was referring to before which was intended to fix the issue looks like it missed one of the base classes (it’s here).

If you want to make this work for now, feel free to cherry-pick this commit into your 4.2 checkout.