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

**URL:** <https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470>\
**Category:** Programming & Scripting\
**Tags:** modules, linker-error, unreal-engine, LyraStarterGame, question, CPP\
**Created:** [January 30, 2024, 7:27pm UTC](https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470 "2024-01-30T19:27:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrSkittles00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrSkittles00](https://forums.unrealengine.com/u/MrSkittles00)\
**Post date:** [January 30, 2024, 7:27pm UTC](https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470/1 "2024-01-30T19:27:16Z")

</div>

```auto
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?

---

<div class="post-metadata">

**Author:** ![1337cookieAgain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/1337cookieagain/32/555511_2.png) [@1337cookieAgain](https://forums.unrealengine.com/u/1337cookieAgain)\
**Post date:** [February 1, 2024, 4:32am UTC](https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470/2 "2024-02-01T04:32:52Z")

</div>

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/1/57180428e79e71585509507bb182387ea6e56bd2.png)

---

<div class="post-metadata">

**Author:** ![MrSkittles00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MrSkittles00](https://forums.unrealengine.com/u/MrSkittles00)\
**Post date:** [February 2, 2024, 10:51am UTC](https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470/3 "2024-02-02T10:51:41Z")

</div>

This worked. Thank you so much!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [March 3, 2024, 10:52am UTC](https://forums.unrealengine.com/t/im-having-linker-errors-when-using-lyrateamstatics-what-module-to-include-when-using-lyra-project-in-c/1654470/4 "2024-03-03T10:52:23Z")

</div>

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