# How to include private header files of other Modules into my Module?

**URL:** <https://forums.unrealengine.com/t/how-to-include-private-header-files-of-other-modules-into-my-module/325438>\
**Category:** Plugins\
**Tags:** include, modules, uht, unreal-engine, editor, Plugins, question\
**Created:** [July 16, 2015, 5:26am UTC](https://forums.unrealengine.com/t/how-to-include-private-header-files-of-other-modules-into-my-module/325438 "2015-07-16T05:26:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_ac78c893](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ac78c893](https://forums.unrealengine.com/u/anonymous_user_ac78c893)\
**Post date:** [October 8, 2015, 6:21pm UTC](https://forums.unrealengine.com/t/how-to-include-private-header-files-of-other-modules-into-my-module/325438/2 "2015-10-08T18:21:07Z")

</div>

I’ve tried to do that in many ways without success, but finally nailed it!

This works for engine modules:

```
using System.IO; // Note this import, it's needed below

namespace UnrealBuildTool.Rules
{
    public class Foo : ModuleRules
    {
        public Foo(TargetInfo Target)
        {
            // ...
            // Get the engine path. Ends with "Engine/"
            string engine_path = Path.GetFullPath(BuildConfiguration.RelativeEnginePath);
            // Now get the base of UE4's modules dir (could also be Developer, Editor, ThirdParty)
            string srcrt_path = engine_path + "Source/Runtime/";
    
            // now you can include the module's private paths!
            // as an example, you can expose UE4's abstraction of D3D11, located in Source/Runtime/Windows/D3D11RHI
            PublicIncludePaths.Add(srcrt_path + "Windows/D3D11RHI/Private");
            PublicIncludePaths.Add(srcrt_path + "Windows/D3D11RHI/Private/Windows");
        }
    }
}

```

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-include-private-header-files-of-other-modules-into-my-module/325438)._
