# Error LNK2019

**URL:** <https://forums.unrealengine.com/t/error-lnk2019/490988>\
**Category:** C++\
**Tags:** c-build-fail, unreal-engine, question, CPP\
**Created:** [November 16, 2021, 7:53pm UTC](https://forums.unrealengine.com/t/error-lnk2019/490988 "2021-11-16T19:53:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antojim6](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/antojim6/32/88717_2.png) [@antojim6](https://forums.unrealengine.com/u/antojim6)\
**Post date:** [November 16, 2021, 7:53pm UTC](https://forums.unrealengine.com/t/error-lnk2019/490988/1 "2021-11-16T19:53:13Z")

</div>

Hello, I’m having a problem using an external library that a friend of mine coded externally to unreal engine.

I have created a folder for the header files and another folder for the .lib files. I’m able to import the .h file without errors into my code but when I try to access a function inside the library I get the error LNK2019.

This is what I’m using in the build.cs file:

```
string LibrariesPath = Path.Combine(ThirdPartyPath, "TTS", "Libraries");

PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libtts-conversion.lib"));
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libvtapi.lib"));

PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "TTS", "Includes"));
```

---

<div class="post-metadata">

**Author:** ![CodingRook](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CodingRook](https://forums.unrealengine.com/u/CodingRook)\
**Post date:** [November 17, 2021, 7:47pm UTC](https://forums.unrealengine.com/t/error-lnk2019/490988/2 "2021-11-17T19:47:25Z")

</div>

There probably should be a little bit more information around this to be able to help you out better, but just a first thought that springs to mind: is this being inserted in the same API module you’re trying to access it from?

---

<div class="post-metadata">

**Author:** ![antojim6](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/antojim6/32/88717_2.png) [@antojim6](https://forums.unrealengine.com/u/antojim6)\
**Post date:** [November 18, 2021, 8:10am UTC](https://forums.unrealengine.com/t/error-lnk2019/490988/3 "2021-11-18T08:10:11Z")

</div>

I’m coding a blueprint function library and including the paths in the build.cs file of that library.  
Someone told me to lell my friend to use extern C linkage and now the error I get is LNK1143. I think the error means the library I’m importing is corrupted, but it’s weird, because I know it works outside of Unreal Engine.
