# Compile errors when creating folders

**URL:** <https://forums.unrealengine.com/t/compile-errors-when-creating-folders/478979>\
**Category:** C++\
**Tags:** folders, c-build-fail, unreal-engine, question, CPP\
**Created:** [February 18, 2021, 6:51am UTC](https://forums.unrealengine.com/t/compile-errors-when-creating-folders/478979 "2021-02-18T06:51:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RailDoc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RailDoc](https://forums.unrealengine.com/u/RailDoc)\
**Post date:** [February 18, 2021, 6:51am UTC](https://forums.unrealengine.com/t/compile-errors-when-creating-folders/478979/1 "2021-02-18T06:51:40Z")

</div>

Then I creating c++ class in “Source//” folder it creates and compiles with no errors.

 ![330074-scrennshot1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/3/d63d891925c2028a006d52ac0e3dd9fb9b18cdfe.png)

But then I’m trying to organize scripts and add script, for example, in “Source//Inventory”,

 ![330075-scrennshot2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/8/4c8ec0d60fbc44639665678cf708b5db241b7622.png)

it cannot compile anymore, .cpp file failes to locate .h file

 ![330076-scrennshot3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/a/93a9cb1ac98b38be52fa195f7378eff16ca02e26.png)

 ![330077-scrennshot4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/1/7610e7c5c26df5c23b533b904f48bb0a4e11fce5.png)

---

<div class="post-metadata">

**Author:** ![LegendOfSparta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LegendOfSparta](https://forums.unrealengine.com/u/LegendOfSparta)\
**Post date:** [May 23, 2022, 5:04pm UTC](https://forums.unrealengine.com/t/compile-errors-when-creating-folders/478979/2 "2022-05-23T17:04:36Z")

</div>

I have the exact issue ! and it’s really annyoing i can’t arrange my project files proberly and it’s a huge project!

---

<div class="post-metadata">

**Author:** ![imakevideogames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/imakevideogames/32/497397_2.png) [@imakevideogames](https://forums.unrealengine.com/u/imakevideogames)\
**Post date:** [May 24, 2022, 8:46am UTC](https://forums.unrealengine.com/t/compile-errors-when-creating-folders/478979/3 "2022-05-24T08:46:32Z")

</div>

If you really want to you can do that…

`PrivateIncludePaths.Add("TestProject/Inventory");`

If other modules need to access the header files in that directory use PublicIncludePaths instead of PrivateIncludePaths. In this case you only have one module so PrivateIncludePaths should be fine.

(Don’t forget to regenerate the visual studio solution files, of course.)
