Errors Building UE4.11 From Source

I am running into errors while following the steps for building UE4.11 from source.

I have followed the instructions found here:
https://github.com/EpicGames/UnrealEngine

I have Visual Studio 2015 with C++ support.

The steps I followed were:

  1. Download zip file.
  2. Unblocked zip.
  3. Unzipped to C:\Data\Engine\UE4.11
  4. Opened an admin console and ran “setup.bat” from C:\Data\Engine\UE4.11.
  5. Within the admin console, ran “GenerateProjectFiles.bat”.
  6. Opened UE4.sln in Visual Studio 2015.
  7. Set solution to Development Editor/Win64.
  8. Attempted to build UE4 (Visual Studio 2013) project.

After doing this, I got the following list of errors (just a sample below):

45>c:\data\engine\ue4.11\engine\source\runtime\core\public\templates\RemoveCV.h(10): error C2894: templates cannot be declared to have ‘C’ linkage
45>c:\data\engine\ue4.11\engine\source\runtime\core\public\templates\RemoveCV.h(11): error C2894: templates cannot be declared to have ‘C’ linkage
45>c:\data\engine\ue4.11\engine\source\runtime\core\public\templates\RemoveCV.h(12): error C2894: templates cannot be declared to have ‘C’ linkage
45>c:\data\engine\ue4.11\engine\source\runtime\core\public\templates\RemoveCV.h(13): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(146): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(147): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(148): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(149): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(150): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(151): error C2894: templates cannot be declared to have ‘C’ linkage
45>C:\Data\Engine\UE4.11\Engine\Source\Runtime\Core\Public\Misc\Char.h(152): error C2894: templates cannot be declared to have ‘C’ linkage

I thought the issue might be due to the message I got when running setup.bat:
Forcing Visual Studio max version to 2013 projects for Android compatibility (use ‘-2015’ to override.)

So, I closed VS2015, re-ran setup.bat with the -2015 switch: “setup.bat -2015” and then re-opened UE4.sln.

After doing this, I still got the same errors.

Any hints on what I may be missing to get this build working? Thanks!

Hey andrewtek-

When downloading the source did you download the 4.11 branch or a specific preview tag from GitHub? Additionally, could you run GenerateProejctFiles.bat with -2015 instead and then attempt to build again? If you are still running into build errors then you may need to redownload the source zip in case some file was corrupted during the download/unzip process.

Thanks for the response. I did the “setup.bat -2015”. I will download again and try “GenerateProjectFiles.bat -2015”.

Hey andrewtek-

Were you able to generate the correct solution files using -2015 while running GenerateProjectFiles? If that doesn’t help you may want to check if you have Android or SDKs installed on your machine as these will force a 2013 solution. Removing the SDKs and running GenerateProjectFiles should work for you without the -2015. Let me know if you’re still having any problems installing the engine.

Cheers