How do I resolve this "inconsistent dll linkage" error when overriding a function in a custom character movement component?

Hi! I’m currently trying to solve an issue I’m having involving the default Character Movement Component’s “slope boosting” safeguards. I want slope boosting, so I just want to completely obliterate the part of the function ComputeSlideVector() that calls HandleSlopeBoosting(). When I override the function in a custom CharacterMovementComponent class, however, I get an “inconsistent dll linkage” error. I didn’t get this error with the custom CMC before trying to override this function.

Here is my .h file for my custom CMC:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "PlayerCharacterMovementComponent.generated.h"

/**
 * 
 */
UCLASS()
class VESPER_API UPlayerCharacterMovementComponent : public UCharacterMovementComponent
{
	GENERATED_UCLASS_BODY()

public:
	virtual FVector ComputeSlideVector(const FVector& Delta, const float Time, const FVector& Normal, const FHitResult& Hit) const override;
};

Here is the .cpp file for the CMC:

// Fill out your copyright notice in the Description page of Project Settings.


#include "PlayerCharacterMovementComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
#include "Math/Vector.h"

UPlayerCharacterMovementComponent::UPlayerCharacterMovementComponent(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer){

}

FVector UCharacterMovementComponent::ComputeSlideVector(const FVector& Delta, const float Time, const FVector& Normal, const FHitResult& Hit) const
{
	FVector Result = Super::ComputeSlideVector(Delta, Time, Normal, Hit);
	//removed check for sliding up slopes
	return Result;
}

And here are the 2 build errors I get:

1>C:\Users\Soda Tunicata\Documents\GitHub\Vesper\Vesper\Source\Vesper\PlayerCharacterMovementComponent.cpp(14): error C4273: 'UCharacterMovementComponent::ComputeSlideVector': inconsistent dll linkage
1>C:\Program Files\Epic Games\UE_5.0\Engine\Source\Runtime\Engine\Classes\GameFramework\CharacterMovementComponent.h(1889): note: see previous definition of 'ComputeSlideVector'
2 Likes

in the .cpp, FVector UCharacterMovementComponent::ComputeSlideVector
should instead be
FVector UPlayerCharacterMovementComponent::ComputeSlideVector