Using NewObject With USplineComponent, Compiler Linker Error, USplineComponent::GetPrivateStaticClass

Dear Friends at Epic,

I’m trying to implement my own splineactor, essentially, since I cannot find spline actor in UE4.

I got really far into it, but am stuck with a compiler error when trying to make a new instance of USplineComponent.

The Compiler cant find USplineComponent::GetPrivateStaticClass(wchar_t const *)

Here’s the relevant code:

NewConnection.SplineComponent = NewObject(VictoryPC);

Here’s the error:

1>Module.VictoryGame.cpp.obj : error LNK2019: unresolved external symbol "public: static class UClass * __cdecl USplineComponent::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@USplineComponent@@SAPEAVUClass@@PEB_W@Z) referenced in function "public: void __cdecl AVictoryPath::Spline_AddConnectionTo(class AVictoryPath *)" (?Spline_AddConnectionTo@AVictoryPath@@QEAAXPEAV1@@Z)
1>E:\RocketVictory\VictoryGame\Binaries\Win64\RocketEditor-VictoryGame.dll : fatal error LNK1120: 1 unresolved externals

I tried to do a work around with the PCIP

AVictoryPath::AVictoryPath(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{
	Spline1 = PCIP.CreateDefaultSubobject < USplineComponent > (this, TEXT("Spline1"));
}

but got the same error

Is this something I just have to wait for?

:slight_smile:

Rama

PS Since I couldn’t wait

I made my own Spline Actor / Spline Component from scratch :slight_smile:

The InterpCurve is awesome!

In the pic the rainbow ball is a 3D control point that you can use to change the curve tangents any time you want :slight_smile:

Hi Rama,

The error message that you are receiving is a known function of the editor. Fortunately, an “unresolved external symbol” error is actually a simple fix on our end of the editor. I have informed James Golding of the issue and gave him a report. If you ever encounter another “unresolved external symbol” error, please let us know and we will alter the code.

Thank you,

Alexander

okay thanks Alex!

I will let you know :slight_smile: