Help! LNK2019 when casting to specific class

I am trying to cast an array of UParticleModules one by one to the UParticleModuleKillBox class in order to grab the kill box module from a particle system emitter’s modules.

However, I get a LNK2019 error in VS2015 when attempting to do so.

Additional details:

  • Trying to get UParticleModuleKillBox::StaticClass() also gives the linker error
  • I have been able to cast other modules (UParticleModuleAttractorPoint) with no problems
  • All of the above classes are a part of the Engine module, which I have included in my build’s public dependencies

Bump:
I’m stuck on this and can’t see a solution nor workaround.

This is the line that causes the crash (where newLOD->Modules[i] is a reference to a UParticleModule):

UParticleModuleKillBox KillBox = Cast(newLOD->Modules[i]);

This works just fine, however:

UParticleModuleAttractorPoint Attractor = Cast(newLOD->Modules[i]);