# How link static library to project?

**URL:** <https://forums.unrealengine.com/t/how-link-static-library-to-project/469998>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 19, 2020, 11:34am UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998 "2020-08-19T11:34:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Desperada](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Desperada](https://forums.unrealengine.com/u/Desperada)\
**Post date:** [August 19, 2020, 11:34am UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/1 "2020-08-19T11:34:36Z")

</div>

Hello everyone, I am a new unreal engine user.

I have a question about linking a static library to a UE4 project. I looked at a lot of documentation on this but there is no demo / tutorial. Most of the time, these are just forums that talk about issues. The recent wiki shutdown doesn’t help as a lot of people are talking about a tutorial link that no longer exists. Do you know where I can find a tutorial to help me?  
This link is deprecated:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

For information, I have the \*.lib and \*.h of another project that I would like to link to my UE4 project (4.24.3).  
I have tried generating a ThirdParty plugin with the editor builder, but I can’t seem to call the default auto-create function. The inclusion of .h is not done.

Thank you for reading me, I only need to know the steps to follow in order to properly link my static library to my project.

Regards

---

<div class="post-metadata">

**Author:** ![FunAndFriendly](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FunAndFriendly](https://forums.unrealengine.com/u/FunAndFriendly)\
**Post date:** [August 19, 2020, 3:06pm UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/2 "2020-08-19T15:06:16Z")

</div>

Desperada, I made an archive of those articles. They are not in great shape, but you should be able to find it here:

> **[An Archive.org backup of wiki.unrealengine.com | wiki.unrealengine.com](https://michaeljcole.github.io/wiki.unrealengine.com/)**
>
> A static site pulled from the internet archive

You might also find an updated version here:

> **[Unreal Engine Community Wiki](https://unrealcommunity.wiki/)**
>
> Welcome to the Unreal Engine Community Wiki; a community-driven resource for educational content pertaining to the Unreal game engine.

---

<div class="post-metadata">

**Author:** ![Desperada](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Desperada](https://forums.unrealengine.com/u/Desperada)\
**Post date:** [August 19, 2020, 3:17pm UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/3 "2020-08-19T15:17:42Z")

</div>

Thank you very much, it is a valuable job that you have done. However regarding my problem, I have not found a solution for the static libraries to link to a game project. You have referenced a guide to add a library to the engine directly, but it is incomplete.

I found a few days ago this guide recovered thanks to an archive but it seems deprecated.  
[http://web.archive.org/web/20140824192306/https://wiki.unrealengine.com/Linking\_Static\_Libraries\_Using\_The\_Build\_System](http://web.archive.org/web/20140824192306/https://wiki.unrealengine.com/Linking_Static_Libraries_Using_The_Build_System)  
Edit:Also, I’ve just found this guide on your website.

---

<div class="post-metadata">

**Author:** ![Desperada](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Desperada](https://forums.unrealengine.com/u/Desperada)\
**Post date:** [August 21, 2020, 7:58am UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/4 "2020-08-21T07:58:36Z")

</div>

Hello,  
I solved my problem by following this guide. It is very well explained and offers additional advice.

[https://nerivec.github.io/old-ue4-wiki/pages/creating-linking-static-libraries-and-make-your-own-blueprint-node-with-vs-2017-ue4.html](https://nerivec.github.io/old-ue4-wiki/pages/creating-linking-static-libraries-and-make-your-own-blueprint-node-with-vs-2017-ue4.html)

So I close this topic.

Thank you.

---

<div class="post-metadata">

**Author:** ![RobertoE90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RobertoE90](https://forums.unrealengine.com/u/RobertoE90)\
**Post date:** [September 27, 2020, 4:04pm UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/5 "2020-09-27T16:04:36Z")

</div>

I love this…that last link is also 404

---

<div class="post-metadata">

**Author:** ![Niskma1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Niskma1](https://forums.unrealengine.com/u/Niskma1)\
**Post date:** [June 16, 2023, 8:31am UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/6 "2023-06-16T08:31:48Z")

</div>

In my case this solved issue (in MyPlugin.Build.cs)

```auto
using System.IO;
using System.Text.RegularExpressions;
using UnrealBuildTool;

public class MyPlugin: ModuleRules
{
	private string ModulePath
	{
		get { return ModuleDirectory; }
	}

	private string ThirdPartyPath
	{
		get { return Path.GetFullPath(Path.Combine(ModulePath, "../ThirdParty/")); }
	}

	private string BinariesPath
	{
		get { return Path.GetFullPath(Path.Combine(ModulePath, "../../Binaries/")); }
	}

	public MyPlugin(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "openh264/lib/openh264.lib"));

		PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "openh264/include"));

		PublicIncludePaths.AddRange(
			new string[] {
				// ... add public include paths required here ...
			}
			);
		PrivateIncludePaths.AddRange(
			new string[] {
				// ... add other private include paths required here ...
			}
			);
		PublicDependencyModuleNames.AddRange(
			new string[]
			{
				"Core",
				"InputCore", 
				// ... add other public dependencies that you statically link with here ...
			}
			);
		PrivateDependencyModuleNames.AddRange(
			new string[]
			{
				"CoreUObject",
				"Engine",
				"Slate",
				"SlateCore",
				// ... add private dependencies that you statically link with here ...	
			}
			);
		DynamicallyLoadedModuleNames.AddRange(
			new string[]
			{
				// ... add any modules that your module loads dynamically here ...
			}
			);
	}
}

```

---

<div class="post-metadata">

**Author:** ![jsprenkle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jsprenkle](https://forums.unrealengine.com/u/jsprenkle)\
**Post date:** [June 15, 2025, 6:58pm UTC](https://forums.unrealengine.com/t/how-link-static-library-to-project/469998/7 "2025-06-15T18:58:12Z")

</div>

The original tutorial is still up [LINK](https://nerivec.github.io/old-ue4-wiki/pages/linking-static-libraries-using-the-build-system.html).

With version 5 engine the reference to the _ **Definitions** _ object fail. It’s been renamed to _ **PublicDefinitions** _.
