# How to Load .h Files From an External .lib?

**URL:** <https://forums.unrealengine.com/t/how-to-load-h-files-from-an-external-lib/351709>\
**Category:** Community & Industry Discussion\
**Tags:** library, header, libraries, unreal-engine, question\
**Created:** [March 25, 2016, 6:35am UTC](https://forums.unrealengine.com/t/how-to-load-h-files-from-an-external-lib/351709 "2016-03-25T06:35:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedVonix](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/redvonix/32/599205_2.png) [@RedVonix](https://forums.unrealengine.com/u/RedVonix)\
**Post date:** [March 25, 2016, 6:35am UTC](https://forums.unrealengine.com/t/how-to-load-h-files-from-an-external-lib/351709/1 "2016-03-25T06:35:43Z")

</div>

I have added a library to our project (specifically the Thrift library). Everything appears to be good, however when compiling, the compiler can never find the header files in the libthrift.lib library.

To load the library, I have added the following in our build.cs file:

```
string LibrariesPath = Path.Combine(ThirdPartyPath, "Thrift", "Libraries");
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libthrift.lib"));
PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "Thrift", "Includes"));

```

The libthrift.lib file itself is placed in ThirdParty/Thrift/Libraries/libthrift.lib

Now when we want to access the library, we include the header file (Thrift.h) which is present in the .lib, by doing this:

```
#include <Thrift/Thrift.h>

```

And that is where things fall apart. Anytime we try and load the header files in the lib, we just get errors, as such:

Severity Code Description File Project Line Suppression State  
Error (active) cannot open source file “Thrift/Thrift.h” d:\Projects\thegrid\Source\TheGrid\thrift\_grid\_types.h TheGrid 12   
Error (active) cannot open source file “Thrift/TApplicationException.h” d:\Projects\thegrid\Source\TheGrid\thrift\_grid\_types.h TheGrid 13   
Error (active) cannot open source file “Thrift/protocol/TProtocol.h” d:\Projects\thegrid\Source\TheGrid\thrift\_grid\_types.h TheGrid 14   
Error (active) cannot open source file “Thrift/transport/TTransport.h” d:\Projects\thegrid\Source\TheGrid\thrift\_grid\_types.h TheGrid 15   
Error (active) cannot open source file “Thrift/cxxfunctional.h” d:\Projects\thegrid\Source\TheGrid\thrift\_grid\_types.h TheGrid 17

I’ve read so many tutorials and pieces of documentation on adding libraries to UE4 that I’m getting dizzy, and coming up with no solutions to this. Any pointers or thoughts or direction would be greatly appreciated - thank you!
