Why can't I build the source code?

Hello everyone,
Since I downloaded the source code(4.0.2 version), I had not been able to build it once.

I always get this error even with the 4.2 version:

2>  UnrealHeaderTool failed for target 'UE4Editor' (platform: Win64, module info: C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealHeaderTool.manifest).
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: La commande "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 Development" s'est arrêtée avec le code -1.

I tried to install DirectX and to uninstall incredibuild, which I did not find, and many other solution, but none of them solve the problem.
Thanks for those who will answer.

Hi sportguitarRC,

Just to make sure, are you also downloading and using the required dependencies for the version of the Editor you are trying to build? You can find the dependency files for version 4.2.0 here.

I downloaded them and put them in the engine folder and still get the same error. :frowning:

Dependencies doesnt go into Engine folder. It should be in Unreal Engine installation folder.

Eg: C:\UnrealEngine

not into this: C:\UnrealEngine\Engine

Yeah this is where I put them, in C:\UnrealEngine. Sorry for the misunderstood. :blush:

**misunderstanding

Are you using Visual Studio 2013 when trying to build the Engine? What is the full output when the build fails?

This is my full ouput and I use visual studio 2013 Professional

1>------ Début de la génération : Projet : UE4, Configuration : Development_Editor x64 ------
1> Building UnrealHeaderTool…
1> Performing 29 actions (max 4 parallel jobs)
1> [3/29] rc.exe PCLaunch.rc
1> PCH.Shared.Core.h.cpp
1> PCH.Core.CorePrivate.h.cpp
1> PCH.Shared.CoreUObject.h.cpp
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1> [5/29] rc.exe PCLaunch.rc
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\Core\PCH.Core.CorePrivate.h.cpp(1): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\Core\Private\CorePrivate.h’ : No such file or directoryC:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\SharedPCHs\PCH.Shared.Core.h.cpp(1) : fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\Core\Public\Core.h’ : No such file or directoryC:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\SharedPCHs\PCH.Shared.CoreUObject.h.cpp(1) : fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Public\CoreUObject.h’ : No such file or directory
1> Module.CoreUObject.1_of_5.cpp
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.1_of_5.cpp(2): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivate.h’ : No such file or directory
1> Module.CoreUObject.2_of_5.cpp
1> Module.CoreUObject.4_of_5.cpp
1> Module.CoreUObject.3_of_5.cpp
1> Module.CoreUObject.5_of_5.cpp
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.4_of_5.cpp(2): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivate.h’ : No such file or directory
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.3_of_5.cpp(2): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivate.h’ : No such file or directory
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.5_of_5.cpp(2): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivate.h’ : No such file or directory
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\CoreUObject\Module.CoreUObject.2_of_5.cpp(2): fatal error C1083: Impossible d’ouvrir le fichier include : ‘C:\Users\Rafaël Côté\Documents\GitHub\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\CoreUObjectPrivate.h’ : No such file or directory
1> [11/29] rc.exe PCLaunch.rc
1> [12/29] rc.exe PCLaunch.rc
1> [13/29] rc.exe PCLaunch.rc
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\Resources\PCLaunch.rc(3): fatal error RC1015: cannot open include file ‘windows.h’.
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UnrealHeaderTool-Core.dll
1> Cumulative action seconds (8 processors): 0,00 building projects, 3,72 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
1> UBT execution time: 5,97 seconds
1> UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Win64, module info: C:\Users\UserName\Documents\GitHub\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: La commande “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development” s’est arrêtée avec le code -1.
========== Génération : 0 a réussi, 1 a échoué, 1 mis à jour, 0 a été ignoré ==========

Thanks again guys for helping me :slight_smile:

If there is some french part you do not understand just tell me which the part you don’t understand and I will translate. :wink:

Hi sportguitarRC,

I noticed that there are some special characters in the file path for the location where you are trying to build the Engine (Rafaël Côté). There is an issue that is internal to Visual Studio where having a special character anywhere in the file path can prevent the Engine, or a game project, from building successfully. It has to do with the way that Visual Studio communicates those characters to the Unreal Build Tool.

Could you please try building the Engine in a location where there are no special characters in the file path, such as C:\Unreal Engine 4\?

I tried to build the Engine form C:\Unreal Engine 4\ and I still get the same error.

Hi sportguitarRC,

A few more things to check/verify:

You mentioned that you installed DirectX. Did you install the June 2010 DirectX redistributable package (if you installed the SDK, that won’t work)?

Also (and this is something I should have asked previously), is your Visual Studio installation located in your user folder that contains the special characters?

Lastly, can you please verify that what you have all of the following in your Unreal Engine 4 folder:

  • .git folder (this may not be visible if you do not have Windows set to display hidden folders, and will not be present if you downloaded the .zip source instead of using GitHub)
  • Engine folder
  • Samples folder
  • Templates folder
  • .gitattributes file
  • .gitignore file
  • GenerateProjectFiles.bat
  • GenerateProjectFiles.command
  • GenerateProjectFiles.sh
  • LICENSE.pdf
  • README.md
  • UE4.sdf
  • UE4.sln
  • UE4.v12.suo

Hi and thanks a lot for the effort you spend to help me.

I think when I installed directX I installed the sdk. Where can I download the redistributable package? When I download it on the microsoft website I have the .exe of the sdk and a bunch of winrar files. I don’t know which one I have to extract or not. So is there another place where I can download it?

Hi sportguitarRC,

You can download the DirectX redistributable package here. When you download it, you will receive an executable file. When you run the executable it will ask you for a location to unpack the installer and all of its required files. Make sure you have an empty folder ready for this (and don’t do what I did the first time and unpack it all onto your desktop). You will end up with a large number of .cab files, a couple .dll files, and another executable. Running the new executable will install the redistributable package.

Sadly, it did not solve my problem :frowning:

Hi sportguitarRC,

Are you still seeing the same output when you try to build the Engine?

I believe we have tried all of the “simple” solutions. We are going to have to start digging deeper into this issue. I apologize for how long it is taking.

One more thing we can try, though. If you have not already done so, could you please download the source again for version 4.2, then the dependencies from the same page, and try one more time?

1>------ Début de la génération : Projet : UE4, Configuration : Development_Editor x64 ------
1> Building UnrealHeaderTool…
1> Performing 29 actions (max 4 parallel jobs)
1> [3/29] rc.exe PCLaunch.rc
1> PCH.Shared.Core.h.cpp
1> PCH.Shared.CoreUObject.h.cpp
1> PCH.Core.CorePrivate.h.cpp
1>C:\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1> [5/29] rc.exe PCLaunch.rc
1> Module.CoreUObject.1_of_5.cpp
1> Module.CoreUObject.4_of_5.cpp
1>C:\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directoryC:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8) : fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1> Module.CoreUObject.3_of_5.cpp
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1> [11/29] rc.exe PCLaunch.rc
1> Module.CoreUObject.2_of_5.cpp
1> Module.CoreUObject.5_of_5.cpp
1>C:\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1>C:\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\PlatformIncludes.h(8): fatal error C1083: Impossible d’ouvrir le fichier include : ‘new’ : No such file or directory
1> [12/29] rc.exe PCLaunch.rc
1>C:\UnrealEngine\Engine\Source\Runtime/Launch/Resources/Windows/PCLaunch.rc(13): fatal error RC1015: cannot open include file ‘windows.h’.
1> [13/29] rc.exe PCLaunch.rc
1>C:\UnrealEngine\Engine\Source\Programs\UnrealHeaderTool\Resources\PCLaunch.rc(3): fatal error RC1015: cannot open include file ‘windows.h’.
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\UnrealEngine\Engine\Binaries\Win64\UnrealHeaderTool-Core.dll
1> Cumulative action seconds (8 processors): 0,00 building projects, 2,28 compiling, 0,00 creating app bundles, 0,00 generating debug info, 0,00 linking, 0,00 other
1> UBT execution time: 5,16 seconds
1> UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Win64, module info: C:\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: La commande “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development” s’est arrêtée avec le code -1.
========== Génération : 0 a réussi, 1 a échoué, 1 mis à jour, 0 a été ignoré ==========

This is the output I am getting now. It changes a bit, but it is mostly the same.
And I will try to download the zip of the engine instead of cloning it with github.
And I apologize too for giving you so much trouble with my problem.

Thanks a lot for your help, i am extremely grateful. :slight_smile:

I realize that my fork is on the 4.1 version. Might it be the cause of the porblem?

If your source code is still on the 4.1 version, then adding the dependencies from 4.2 will cause compile errors similar to what you have been showing me. Can you sync up to the 4.2 version on your fork?

Now I’m getting an error in github, I can’t recopy anymore the engine in my computer. The error says that my internet is the problem, but for in fact my internet work find.