# C++ Compile can't find #include files

**URL:** <https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529>\
**Category:** Platform & Builds\
**Tags:** error-compile, unreal-engine, UE4, question\
**Created:** [May 23, 2015, 11:12am UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529 "2015-05-23T11:12:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stocker\_00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stocker\_00](https://forums.unrealengine.com/u/Stocker_00)\
**Post date:** [May 23, 2015, 11:12am UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/1 "2015-05-23T11:12:31Z")

</div>

Hi, I’m converting a game to a template so I don’t have to keep creating files with each new engine. I have built the template from scratch with 4.8 preview 3. And the only problem that I am getting is a error in Visual Studio.

The are 3 errors, but the same error number.

Error C1083: Cannot open include file: ‘Networking.h’: No such file or directory

Error C1083: Cannot open include file: ‘Voice.h’: No such file or directory

Error C1083: Cannot open include file: ‘CanvasPanelSlot.h’: No such file or directory

---

<div class="post-metadata">

**Author:** ![Stocker\_00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stocker\_00](https://forums.unrealengine.com/u/Stocker_00)\
**Post date:** [May 23, 2015, 12:42pm UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/2 "2015-05-23T12:42:40Z")

</div>

I fixed the problem with my files. I needed to put

#include “Runtime/UMG/Public/Components/CanvasPanelSlot.h”

And do that for the file.h that I wanted to select within the Runtime Folder. But now I am getting other errors that are within those files when I compile , in either hot reload in UE4 editor and in VS. So I will make a Bug report

---

<div class="post-metadata">

**Author:** ![Jamie\_Dale](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jamie_dale/32/1165413_2.png) [@Jamie\_Dale](https://forums.unrealengine.com/u/Jamie_Dale)\
**Post date:** [May 27, 2015, 10:09am UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/3 "2015-05-27T10:09:19Z")

</div>

It sounds like you’re missing some dependencies in your `.Build.cs` file.

You’ll likely need to add the “Networking”, “Voice” and “UMG” modules to the `PublicDependencyModuleNames` or `PrivateDependencyModuleNames` array in your `.Build.cs` file.

Including the header file as you have will prevent UBT being able to define some symbols that you may need (such as the API macros for each module, eg) `VOICE_API`), and that will likely cause compile errors.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5b0c6e9e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5b0c6e9e](https://forums.unrealengine.com/u/anonymous_user_5b0c6e9e)\
**Post date:** [December 1, 2015, 10:07pm UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/4 "2015-12-01T22:07:30Z")

</div>

Hi, Jamie,

I’m trying to use Voice.h and OnlineSubsystemUtils.h . I have added “Voice” etc. in my .Build.cs file for my game but I am still running into the same error.  
I have included the header files in the header file for my C++ actor as well. I would really appreciate your help. Thank you.

Note: I can not find the Voice.h file in the external dependencies folder of my game. I have downloaded a sample project that has Voice.h included and everything works smoothly in that project. I also saw some differences in the .ini files and I have copied those parts of the code where voice is enabled

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d7cbf4ea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d7cbf4ea](https://forums.unrealengine.com/u/anonymous_user_d7cbf4ea)\
**Post date:** [July 14, 2016, 1:32pm UTC](https://forums.unrealengine.com/t/c-compile-cant-find-include-files/319529/5 "2016-07-14T13:32:47Z")

</div>

After adding your modules to the PublicDependencyModuleNames you have to save the project, exit Visual Studio and then right click your .uproject file and hit “Generate Visual Studio project files”.  
Then it should work. 🙂
