# Unable to find Generated file from other module

**URL:** <https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501>\
**Category:** C++\
**Tags:** header, unreal-engine, generated, editor, UE4, question, CPP\
**Created:** [December 13, 2014, 6:04pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501 "2014-12-13T18:04:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrynBennett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BrynBennett](https://forums.unrealengine.com/u/BrynBennett)\
**Post date:** [December 13, 2014, 6:04pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/1 "2014-12-13T18:04:05Z")

</div>

I am trying to separate our game into 2 different modules. One is for the game and one is for the editor. Most of it is working except when I include any files from the game module from a file in the editor module, it can’t find the “generated.h”. Any help would be very appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aee5288a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aee5288a](https://forums.unrealengine.com/u/anonymous_user_aee5288a)\
**Post date:** [July 30, 2015, 11:21pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/2 "2015-07-30T23:21:52Z")

</div>

Have You fixed it? I’m currently having the same problem.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9026aeba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9026aeba](https://forums.unrealengine.com/u/anonymous_user_9026aeba)\
**Post date:** [January 6, 2016, 12:38am UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/3 "2016-01-06T00:38:45Z")

</div>

Yeah ditto…any luck?

---

<div class="post-metadata">

**Author:** ![BrynBennett](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BrynBennett](https://forums.unrealengine.com/u/BrynBennett)\
**Post date:** [January 6, 2016, 1:56am UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/4 "2016-01-06T01:56:04Z")

</div>

Oh man… yes… I did get it working, but I can’t remember how. I now have the two projects working.

I had to make a file called UE4Games.uprojectdirs and put this in it:

; These folders will be searched 1 level deep in order to find projects  
; UnrealBuildTool will store the following information:  
; - Project name  
; - Location of project  
; - Whether it has code or not  
; - TargetNames contains at the project location  
;  
./  
Engine/Source/

That goes in the root level.

Then… I think I just added source files into a different folder and ran GenerateProjectFiles. There may be something else I’m missing though. Sorry about that.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9026aeba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9026aeba](https://forums.unrealengine.com/u/anonymous_user_9026aeba)\
**Post date:** [January 6, 2016, 5:03pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/5 "2016-01-06T17:03:58Z")

</div>

Well hey, that’s better than nothing! Just might help me get on the right path. Thanks for responding.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aee5288a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aee5288a](https://forums.unrealengine.com/u/anonymous_user_aee5288a)\
**Post date:** [January 6, 2016, 5:17pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/6 "2016-01-06T17:17:13Z")

</div>

I’ve got it working by adding paths to the game module source files in the `PrivateIncludePaths` of the editor’s Build.cs. besides having the game module added to the `PublicDependencyModuleNames`. Important thing is to also add `XXX_API` macro (where `XXX` is the name of your game module) to the class/struct/method definitions you want to export from the game module (make accessible by the editor module).

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9026aeba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9026aeba](https://forums.unrealengine.com/u/anonymous_user_9026aeba)\
**Post date:** [January 7, 2016, 4:30pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/7 "2016-01-07T16:30:29Z")

</div>

Thanks for your response man. Unfortunately I still can’t get mine to compile after following your advice. I have a bit of a different situation, but I think the fundamental issue is the same, so maybe you’ll have some insight…

I’m trying to derive from UAnimGraphNode\_Base (an original editor class) in our MHEditor module, and it can’t find the AnimGraphNode\_Base.generated.h. I’ve tried adding the path to AnimGraphNode\_Base.h in the MHEditor.Build.cs file, but no luck.

I could probably figure it out if I knew how the build tool went about finding the generated files to begin with, as they’re obviously put in temporary directories (Intermediate/…) that aren’t specified in Build.cs.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aee5288a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aee5288a](https://forums.unrealengine.com/u/anonymous_user_aee5288a)\
**Post date:** [January 7, 2016, 6:42pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/8 "2016-01-07T18:42:41Z")

</div>

Do you add `AnimGraph` module to `PublicDependencyModuleNames` in your Build.cs file? This is all you should be required to do.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9026aeba](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9026aeba](https://forums.unrealengine.com/u/anonymous_user_9026aeba)\
**Post date:** [January 7, 2016, 7:04pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/9 "2016-01-07T19:04:20Z")

</div>

Ahh, yup that it did it! Should have known…So evidently the module is what contains the generated header paths. Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_aee5288a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_aee5288a](https://forums.unrealengine.com/u/anonymous_user_aee5288a)\
**Post date:** [January 7, 2016, 7:37pm UTC](https://forums.unrealengine.com/t/unable-to-find-generated-file-from-other-module/301501/10 "2016-01-07T19:37:58Z")

</div>

Yes, adding the module to your module rules tells the UBT, which in turn tells the compiler, where to look for all the module related files 🙂
