Using Blueprint Function Libraries in C++

Hey All,

I have a question about using some Blueprint Function Library functions in my c++ classes.

I have a case where I want to call some functions that come with the Engine. Those functions live in a BlueprintFunctionLibrary and for some reason I keep getting “error LNK2019: unresolved external symbol”.

For example I want to do this in my .cpp file:

const TArray<UMovieSceneTrack*>& MovieSceneTracks = UMovieSceneSequenceExtensions::GetTracks(LevelSequenceAsset.Get());

I’ve included the header like so

#include "ExtensionLibraries/MovieSceneSequenceExtensions.h"

and I’ve added the module to my .Build.cs file:

		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core", 
...
                "SequencerScripting"
				// ... add other public dependencies that you statically link with here ...
			}
			);

Still I get the unresolved external symbol error.

I’m guessing it is a super easy thing I’m missing but would love someone to help.

Thanks

You need to add the module to the “private” dependency if you call the function in a cpp file.
If you used it in a public accessible header file it would have sufficed as a public dependency.

Hey,

Thanks for the reply!

I tried adding the module name to the private dependency list but I still get the “unresolved external symbol” error.