I'm Having Linker Errors when using LyraTeamStatics. What Module to Include When Using Lyra Project in C++?

0>Module.SampleGameRuntime.cpp.obj: Error  : LNK2019: unresolved external symbol "public: static class ULyraTeamDisplayAsset * __cdecl ULyraTeamStatics::GetTeamDisplayAsset(class UObject const *,int)" (?GetTeamDisplayAsset@ULyraTeamStatics@@SAPEAVULyraTeamDisplayAsset@@PEBVUObject@@H@Z) referenced in function "private: void __cdecl AMyActor::UpdateActorColor(void)const " (?UpdateActorColor@AMyActor@@AEBAXXZ)

0>UnrealEditor-SampleGameRuntime.dll: Error  : LNK1120: 1 unresolved externals

I am having a linker error when using ULyraTeamStatics. I alredy have “LyraGame” included in my PublicDependencyModuleNames but the linker error still persist. Upon Checking, ULyraTeamStatics is part of LyraGame. How do I fix this? Are there more Modules that I need to add?

1 Like

You might need to mark the LyraTeamStatics class with “LYRAGAME_API” to access it outside of LyraGame (see attached image), I could be wrong. There’s a few places this would’ve been nice to have already been done already in the source for Lyra.

1 Like

This worked. Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.