# Unreal can't load .lib file and gets stuck

**URL:** <https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196>\
**Category:** C++\
**Tags:** third-party-librarie, unreal-engine, crash, bug-report, editor, CPP, question\
**Created:** [April 3, 2024, 10:23am UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196 "2024-04-03T10:23:54Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 2:01pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/21 "2024-04-05T14:01:10Z")

</div>

Yeah I added a breakpoint in visual studio debugging it’s not called I don’t even know why when I comment my calls of imi functions everything works right but when I uncomment it they are never but for some reason freezes the unreal editor screen

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 2:01pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/22 "2024-04-05T14:01:57Z")

</div>

I could give you the full loading log until it loads the imitationLib.dll but I doubt that would be useful

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 5, 2024, 2:37pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/23 "2024-04-05T14:37:40Z")

</div>

You could try without the try catch, commenting out every line and then running it uncommenting one line at a time and see it it fails straight away or at a certain function call.

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 2:41pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/24 "2024-04-05T14:41:01Z")

</div>

That’s what I just tried hehe and yeah even the basic functions (like a setter and a getter) get my unreal editor’s screen frozen

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 5, 2024, 3:01pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/25 "2024-04-05T15:01:11Z")

</div>

If you are using a dll why not load it dynamically in engine line the library example I sent you. You could at least know if the dll is the culprit

also do you have the dll marked in your build file?

```auto
RuntimeDependencies.Add(Path.Combine("$(ProjectDir)","Plugins","MyDllDir" , "myLibrary.DLL"));

```

Then in you plugins dir you need for example `MyDllDir` which has the dll file inside.

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 3:04pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/26 "2024-04-05T15:04:06Z")

</div>

The lib I’m linking in my plugin is not a dll, it’s a static one so a .lib

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 5, 2024, 3:05pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/27 "2024-04-05T15:05:17Z")

</div>

> [@444\_Nuits](#):
>
> I could give you the full loading log until it loads the imitationLib.dll but I doubt that would be useful

You mentioned it’s a dll

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 3:11pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/28 "2024-04-05T15:11:21Z")

</div>

I meant my UnrealEditor-ImitationLib.dll generated by UE which is placed in the binaries folder of my plugin sorry

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 5, 2024, 3:13pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/29 "2024-04-05T15:13:50Z")

</div>

Well you could also just generate a dll if you have the source. Not much difference between a lib and dll output wise from the ide’s point of view.

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 5, 2024, 3:45pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/30 "2024-04-05T15:45:33Z")

</div>

I don’t have access to the source file but I have a clue,

I created an actor class AudioCaptureActor in my **game** files BUT this actor depends of a c++ component class created in my **plugin** folder class so in order for it to work I had to make my game dependent of my plugin which is a bad way of reasoning :

```c++
public class MyProject2 : ModuleRules
{
	public MyProject2(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(new string[] 
			{ 
				//default modules
				"Core",
				"CoreUObject", 
				"Engine",
				"InputCore", 
				"HeadMountedDisplay",

				//added modules
				"SignalProcessing",
				"AudioMixer",
				"XmlParser",
				"UMG"
			}
    );

		PrivateDependencyModuleNames.AddRange(new string[]
		{
			"ImitationLib"
		}
		);

		PrivateIncludePathModuleNames.AddRange(new string[]
			{
				"ImitationLib"
			}
		);

	}

```

I’m gonna move my actor in my plugin content folder instead and see if that fixes the issue

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 9, 2024, 9:41am UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/31 "2024-04-09T09:41:47Z")

</div>

Nope didn’t fix it maybe it’s the intel lib that causes problem idk if anyone have ever tried linking them to unreal engine this ones :

```c++
PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ippcore.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ipps.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ippvm.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ThirdPartyPath, "Lib", "ippch.lib"));

```

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [April 9, 2024, 12:18pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/32 "2024-04-09T12:18:17Z")

</div>

All Iintel libs. Could it be a processor mismatch by having an AMD?

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 9, 2024, 12:22pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/33 "2024-04-09T12:22:56Z")

</div>

Yeah nope it’s not it the ipp libs works fine on a blank project so the issue resides in my imitation.lib by default

---

<div class="post-metadata">

**Author:** ![444\_Nuits](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/444_nuits/32/901354_2.png) [@444\_Nuits](https://forums.unrealengine.com/u/444_Nuits)\
**Post date:** [April 11, 2024, 2:11pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/34 "2024-04-11T14:11:32Z")

</div>

Finally solved it !! I used the ippsmt.lib instead of using the ipps.lib and for some reason using the ippsmt blocked all kind of logs

---

<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:** [May 11, 2024, 2:12pm UTC](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196/35 "2024-05-11T14:12:12Z")

</div>

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

[Previous page](https://forums.unrealengine.com/t/unreal-cant-load-lib-file-and-gets-stuck/1785196.md?page=1)
