Can't Compile My Projects Source Code

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.

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?

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. :slight_smile:

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

64170-2015-10-26+12_36_53-message.png

alt text

64169-2015-10-26+12_34_34-error.png

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.

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.

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

Any ideal?

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

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

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?

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.

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!