Can't load level sequence in c++?

I would like to load all my level sequences during gameplay in C++ and do some stuff with all the animations they contain.
I tried several ways and I keep running into errors like this:

UMovieSceneSequence* movie= Cast<UMovieSceneSequence>(assetData.GetAsset());

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “__declspec(dllimport) private: static class UClass * __cdecl UMovieSceneSequence::GetPrivateStaticClass(void)” (_imp?GetPrivateStaticClass@UMovieSceneSequence@@CAPEAVUClass@@XZ) referenced in function “public: void __cdecl AnimationPlayer::initialize(class Px::String const &)” (?initialize@AnimationPlayer@@QEAAXAEBVString@Px@@@Z) SWP_VR D:\svn\SWP_VR\Intermediate\ProjectFiles\Module.SWP_VR.1_of_3.cpp.obj 1

The same happens for ULevelSequence and also when I write this:

AssetRegistryModule.Get().GetAssetsByClass(ULevelSequence::StaticClass()->GetFName(), AssetData);

Any suggestions? I would be grateful for any ideas!

Did you add #include “MovieSceneSequence.h” in the header file?

Error LNK2019 usually refers to a situation where there’s a function declaration, but no definition.

Yes, I have this: #include "Runtime/MovieScene/Public/MovieSceneSequence.h

I managed to solve it by modifying the build file:
PublicDependencyModuleNames.AddRange(new string] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “LevelSequence”, “MovieScene” });

Tutorial en español.

Github source code.

Discussion in another entry I made.