UE4 Visual Studio Build Failed

I have been following this tutorial:

But when I try to Build it on Visual studio
I get this error:

1>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
1> Building UnrealHeaderTool…
1> Performing 23 actions (6 in parallel)
1> Module.CoreUObject.3_of_4.cpp
1> Module.CoreUObject.2_of_4.cpp
1> Module.CoreUObject.1_of_4.cpp
1> PCH.CorePrivatePCH.h.cpp
1> PCH.Core.h.cpp
1> PCH.CoreUObject.h.cpp
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057): error C3861: ‘exp2’: identifier not foundc:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057) : error C3861: ‘exp2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069): error C3861: ‘log2’: identifier not foundc:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069) : error C3861: ‘log2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057): error C3861: ‘exp2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057): error C3861: ‘exp2’: identifier not foundc:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057) : error C3861: ‘exp2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069): error C3861: ‘log2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069): error C3861: ‘log2’: identifier not foundc:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069) : error C3861: ‘log2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057): error C3861: ‘exp2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069): error C3861: ‘log2’: identifier not found
1> Module.CoreUObject.4_of_4.cpp
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1057): error C3861: ‘exp2’: identifier not found
1>c:\program files\epic games\engine\source\runtime\core\public\math\UnrealMathSSE.h(1069): error C3861: ‘log2’: identifier not found
1>C:\Program Files\Epic Games\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectHash.cpp(181): error C2338: Class needs operator==().
1>C:\Program Files\Epic Games\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectHash.cpp(181): error C2338: Class needs operator!=().
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: C:\Program Files\Epic Games\Engine\Binaries\Win64\UnrealHeaderTool-Core.dll
1> Total build time: 14.95 seconds
1> UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Win64, module info: C:\Program Files\Epic Games\Engine\Intermediate\Build\Win64\UE4Editor\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command “…..\Build\BatchFiles\Build.bat UE4Editor Win64 Development” exited with code -1.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

There is an easy way to get UE4 from Github

1-Go to Releases , then download last version

2-Extract files to a folder

3-Run Setup.bat

4-When files are downloaded , Run “GenerateProjectFiles.bat”

5-Open “UE4.sln”

6-Complile “Developement Editor”

Mhousse1247 is completely correct. The video you’ve linked is fairly old and is outdated for our most recent builds of the engine. I’ll be looking into getting this video replaced. In the meantime, you can follow Mhousse1247’s instructions and find more information at the following page:

Done everything he said but still UE4 doesn’t see visual studio, could it be because I have Windows version of visual studio, but not The Desktop Version? By the way I’m running Win10

That is correct, you’ll need the desktop version of Visual Studio to use it with the engine. You may also run into further problems related to Windows 10 as we don’t support it as of yet. This shouldn’t stop you from compiling the engine however.

what kind of problems?

I am unsure of particular problems but the reason I mention it is that, as we did not support Windows 10 for 4.8, we did not test 4.8 for on Windows 10 and multiple issues due to compatibility may arise. 4.9 has been tested on Windows 10 however and shouldn’t have any compatibility problems if you would like to use that version going forward.