# SharedPCH.Engine.h.pch not found

**URL:** <https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, Blueprint, question\
**Created:** [December 3, 2019, 4:54pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094 "2019-12-03T16:54:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Natural\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Natural\_Games](https://forums.unrealengine.com/u/Natural_Games)\
**Post date:** [December 3, 2019, 4:54pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/1 "2019-12-03T16:54:18Z")

</div>

Hey,

I wanted to add a simple C++ class to my blueprint based project, but when it auto compiled in the editor it threw an error and told me to rebuild the module. If I try to build manually from source I’m getting the following error: “SharedPCH.Engine.h.pch”: No such file or directory

What I tried:

- Set the PCHUsage to no pch and even specified my own header file for this purpose, but then it’s just giving the same error with a different filename.
- I cannot disable header precompiling in VS since there is no freakin option in the configuration settings.
- I deleted the Intermediate and Saved folder and I also made sure to clean the project and rebuild (also with admin privileges)

I’m on VS 2019 and set the accessor in the config to exactly that. I do have installed the UE4 installer integration, C++ game dev tools and the windows 10 SDK.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Natural\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Natural\_Games](https://forums.unrealengine.com/u/Natural_Games)\
**Post date:** [December 4, 2019, 11:21am UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/2 "2019-12-04T11:21:11Z")

</div>

Okay, I found the answer, I just don’t know why.

I moved my project directory outside of my OneDrive folder into my documents folder (Unreal Projects). Could a long path length be causing such an issue?

---

<div class="post-metadata">

**Author:** ![metablaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/metablaster/32/631348_2.png) [@metablaster](https://forums.unrealengine.com/u/metablaster)\
**Post date:** [December 4, 2019, 9:07pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/3 "2019-12-04T21:07:32Z")

</div>

first you should use git for keeping track of changes in your project not onedrive.

second you must put **PCHUsageMode.UseExplicitOrSharedPCH** into your module’s **.build.cs** file inside your project.

once you do this, rebuild your project and your PCH header will be located in:

**PROJECT LOCATION DIRECTORY\Intermediate\Build\Win64\Your Project Name\Development\Engine**

that’s is if you want to make use of this precompiled header to boost intellisense speed follow these steps:

right click on your project then properties then NMake and under Intellisense section input following into **last** input box:

**/Yu SharedPCH.Engine.h.pch**

If you need additional information let me know!

---

<div class="post-metadata">

**Author:** ![Natural\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Natural\_Games](https://forums.unrealengine.com/u/Natural_Games)\
**Post date:** [December 4, 2019, 9:59pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/4 "2019-12-04T21:59:26Z")

</div>

Well no, I’m not really able to use git as I’m developing from different devices and my project already’s got a size of more than 20GB. Uploading that to git is not really funny.

Second, I did put that expression into my build file and I also rebuilt my project. But it did not generate the precompiled header.

---

<div class="post-metadata">

**Author:** ![metablaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/metablaster/32/631348_2.png) [@metablaster](https://forums.unrealengine.com/u/metablaster)\
**Post date:** [December 4, 2019, 10:03pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/5 "2019-12-04T22:03:00Z")

</div>

Most likely if you use buildconfiguration.xml it is not set to generate precompiled header, or it could be that your project does not comply with IWYU:

> **[IWYU](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/BuildTools/UnrealBuildTool/IWYU/)**
>
> A brief overview of the updated code base for UE4, now using an Include-What-You-Use (IWYU) dependency model.

---

<div class="post-metadata">

**Author:** ![Natural\_Games](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Natural\_Games](https://forums.unrealengine.com/u/Natural_Games)\
**Post date:** [December 4, 2019, 10:32pm UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/6 "2019-12-04T22:32:46Z")

</div>

Even if that would be the case, that doesn’t explain why it worked when I moved the project folder into another…

---

<div class="post-metadata">

**Author:** ![RMGgames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RMGgames](https://forums.unrealengine.com/u/RMGgames)\
**Post date:** [March 16, 2022, 9:34am UTC](https://forums.unrealengine.com/t/sharedpch-engine-h-pch-not-found/459094/9 "2022-03-16T09:34:54Z")

</div>

I also solved the error by moving the proyect to another route, in my case I think it was because in the route it appears my name, which contains a non-ASCII character. So I think if you have an non ASCII character the compiler can’t find the file.

Thank you for givig the idea to change the route
