# Can't Compile My Projects Source Code

**URL:** <https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459>\
**Category:** C++\
**Tags:** unreal-engine, compile, CPP, question\
**Created:** [October 25, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459 "2015-10-25T18:36:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 25, 2015, 6:36pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/1 "2015-10-25T18:36:54Z")

</div>

Hello there,

I have an error trying to compile the source code of my project. Can someone please help me fix this ASAP?  
Error 1 error : All source files in module “demoGame” must include the same precompiled header first. Currently “C:\Dev\Projects\Unreal\demoGame\Source\demoGame\demoGame.h” is included by most of the source files. The following source files are not including “C:\Dev\Projects\Unreal\demoGame\Source\demoGame\demoGame.h” as their first include: C:\Dev\Projects\Unreal\demoGame\Intermediate\ProjectFiles\EXEC demoGame

UPDATE:  
I have found the issue. The issue was that when I made a C++ HUD code, it stopped compiling later during the creation of my project. I removed the code from the visual studios project, and it compiled correctly.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 26, 2015, 3:50pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/2 "2015-10-26T15:50:25Z")

</div>

Hello jordan1818,

The first thing to try would be to delete the Intermediates folder. After that, right-click the .uproject file and select “Generate Visual Studio Project files”. Attempt compiling again after that.

If that doesn’t help, it would be good to test to see if the same issue happens in a fresh project. Can you try a new C++ project to see if the same issue occurs?

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 4:37pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/3 "2015-10-26T16:37:30Z")

</div>

I have done the first one and it has failed. It first I tried to open the project by using the project browser and couldn’t find id then it told me when opening it that I wasn’t unreal 4.9 and tried build the dll’s. Attached is the screenshots of them.

Then I have tried to create a new project, that compiles correct way.

Let me know as soon as you can. 🙂

Also, I tried to open the project by uproject and it gave me this error.

![64170-2015-10-26+12_36_53-message.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/a/eeac9f80787a569e2aecc147902d058c9df35338.png)

alt text

![64169-2015-10-26+12_34_34-error.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/5/0a500bcb602dfa56febba9884df5be54595e9f2d.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 26, 2015, 4:48pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/4 "2015-10-26T16:48:09Z")

</div>

For that first error, it seems to be missing a file inside of the engine itself. Could you try verifying the installation through the Epic Games Launcher?

The message “demoGametest could not be compiled. Try rebuilding from source manually” means that there were compiler errors. After doing all of this, could you try compiling again in visual studio and see if the error message you receive is the same? If so, could you also check the Output tab in Visual Studio and copy/paste what is shown there? If there is a lot of it, it may be best to upload it in a .txt file.

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 5:27pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/5 "2015-10-26T17:27:03Z")

</div>

I have tried to delete the engine and re-download it. It is still giving me the uncooked message, and I can’t seem to generate projects or compile it. Hard to get the error again.

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 6:01pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/6 "2015-10-26T18:01:44Z")

</div>

Also can’t load the solution either in visual studios 2013.

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 10:35pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/7 "2015-10-26T22:35:56Z")

</div>

Any ideal?

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 10:51pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/8 "2015-10-26T22:51:01Z")

</div>

I was able to get into VS and get the logs, Attaches is the log for it. Let me know if you can see something. Thank you

link text

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 10:59pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/9 "2015-10-26T22:59:33Z")

</div>

I have also cloned the project and it still could not compile. So It much be somewhere in the project.

---

<div class="post-metadata">

**Author:** ![jordan1818](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jordan1818](https://forums.unrealengine.com/u/jordan1818)\
**Post date:** [October 26, 2015, 11:03pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/10 "2015-10-26T23:03:02Z")

</div>

I have found the issue. I could not build HUD in C++. After removing the HUD from my source code. It was able to compile. If i show you the code, can you be able to see what is wrong?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 27, 2015, 1:35pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/11 "2015-10-27T13:35:52Z")

</div>

I’m still looking into the issue but please wait to bump a post until 3 days have passed with no response. If you wish to add more information in the meantime, please edit your previous post and add the new information.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_41845f4a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_41845f4a](https://forums.unrealengine.com/u/anonymous_user_41845f4a)\
**Post date:** [October 27, 2015, 9:53pm UTC](https://forums.unrealengine.com/t/cant-compile-my-projects-source-code/336459/12 "2015-10-27T21:53:55Z")

</div>

I’m glad to find that you found the solution. In the future, please post the solution as an answer so that it can be accepted and easily visible for other users. I’ll be marking this post as resolved and post a copy of your solution below.

Solution: I have found the issue. The issue was that when I made a C++ HUD code, it stopped compiling later during the creation of my project. I removed the code from the visual studios project, and it compiled correctly.

Have a nice day!
