Author Topic: Build failed on GenerateProjectFiles.bat  (Read 7386 times)

I've got some errors building the engine from Allegorithmic's repo. Here's what I did:

 1. Downloaded the source from https://github.com/Allegorithmic/UnrealEngine/tree/4.11-substance_plugin
 2. Run the setup.bat - All dependencies download completed successfully
 3. Run GenerateProjectFiles.bat

Got the errors below:

Code: [Select]
Setting up Unreal Engine 4 project files...
Forcing Visual Studio max version to 2013 projects for Android compatibility (use '-2015' to override.)
Messages while compiling K:\UnrealEngine-release-4.11\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:
k:\UnrealEngine-release-4.11\Engine\Source\Developer\iOS\MetalShaderFormat\MetalShaderFormat.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'MetalShaderFormat'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\FriendsAndChat\FriendsAndChat.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'FriendsAndChat'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\ImageCore\ImageCore.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'ImageCore'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\ImageWrapper\ImageWrapper.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already containsa definition for 'ImageWrapper'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\IOS\MetalRHI\MetalRHI.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'MetalRHI'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SessionMessages\SessionMessages.Build.cs(5,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'SessionMessages'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SessionServices\SessionServices.Build.cs(5,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'SessionServices'
k:\UnrealEngine-release-4.11\Engine\Source\Runtime\SynthBenchmark\SynthBenchmark.Build.cs(5,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'SynthBenchmark'
k:\UnrealEngine-release-4.11\Engine\Plugins\Runtime\TwitchLiveStreaming\Source\ThirdParty\Twitch\Twitch.Build.cs(7,14) : error CS0101: The namespace '<global namespace>' already contains a definition for 'Twitch'
k:\UnrealEngine-release-4.11\Engine\Plugins\ScriptPlugin\Source\ScriptGeneratorPlugin\ScriptGeneratorPlugin.Build.cs(7,15) : error CS0101: The namespace 'UnrealBuildTool.Rules' already contains a definition for 'ScriptGeneratorPlugin'
UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files.

Press any key to continue . . .

I'm on Windows 7 64bit, Visual Studio 2013 express edition.
Within these spec, I have built 4.1, 4.3, 4.4, 4.6, 4.7, 4.9 all those versions (without substance plugin) last time without any error.

Please help
Thanks in advance

Hi sohan,

I downloaded the zip from github and ran Setup && GenerateProjectFiles -2013 on it, without error. Do you get these errors if you download the Vanilla 4.11.0-release rom Epic Games?

Hi sohan,

I downloaded the zip from github and ran Setup && GenerateProjectFiles -2013 on it, without error. Do you get these errors if you download the Vanilla 4.11.0-release rom Epic Games?
No, vanilla release compiles just fine. Only Allegorithmic's version gives these error for me.

Got it working till generate the solution file. 10 directories with classes are found duplicated. Let's see now if I can successfully build the engine or not. If it does work, I'll post the list of directories here so that other people who gets the same error, can fix it.

Hi sohan,

How strange. For the record I downloaded https://github.com/Allegorithmic/UnrealEngine/archive/4.11-substance_plugin.zip , in case that helps at all.

Hi Josh,

Now getting new 135 errors on Build in Visual Studio :(

I know the root of this error is just one or two thing, but I cannot troubleshot this. Please help

Here are first 30 errors:

Code: [Select]
Error   1   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(substance.obj)   UE4
Error   2   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkercontext.obj)   UE4
Error   3   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkerhandle.obj)   UE4
Error   4   error LNK2005: "public: __cdecl std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QEAA@AEBV01@@Z) already defined in MSVCRT.lib(MSVCR120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkerhandle.obj)   UE4
Error   5   error LNK2005: "public: __cdecl std::exception::exception(class std::exception const &)" (??0exception@std@@QEAA@AEBV01@@Z) already defined in MSVCRT.lib(MSVCR120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkerhandle.obj)   UE4
Error   6   error LNK2005: "public: virtual __cdecl std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UEAA@XZ) already defined in MSVCRT.lib(MSVCR120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkerhandle.obj)   UE4
Error   7   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(pfxcookerapilinkerhandle.obj)   UE4
Error   8   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(substance_xml.obj)   UE4
Error   9   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerhandle.obj)   UE4
Error   10   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerhandle.obj)   UE4
Error   11   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(compressionstd7zdecode.obj)   UE4
Error   12   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(compressionstd7zdecode.obj)   UE4
Error   13   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(tinyxml2.obj)   UE4
Error   14   error LNK2005: printf already defined in MSVCRT.lib(MSVCR120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(tinyxml2.obj)   UE4
Error   15   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmdecodedassemblies.obj)   UE4
Error   16   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmdecodedassemblies.obj)   UE4
Error   17   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerdetailhandleimpl.obj)   UE4
Error   18   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerdetailhandleimpl.obj)   UE4
Error   19   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(compressionlzma.obj)   UE4
Error   20   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmunpackeddata.obj)   UE4
Error   21   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmunpackeddata.obj)   UE4
Error   22   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmcompositinggraph.obj)   UE4
Error   23   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmcompositinggraph.obj)   UE4
Error   24   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmblock.obj)   UE4
Error   25   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmblock.obj)   UE4
Error   26   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmassembly.obj)   UE4
Error   27   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(asmassembly.obj)   UE4
Error   28   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerdetailcontext.obj)   UE4
Error   29   error LNK2038: mismatch detected for '_MSC_VER': value '1900' doesn't match value '1800' in Engine.h.obj   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerdetailcachemapping.obj)   UE4
Error   30   error LNK2005: "public: void __cdecl std::_Container_base0::_Orphan_all(void)" (?_Orphan_all@_Container_base0@std@@QEAAXXZ) already defined in msvcprt.lib(MSVCP120.dll)   K:\UnrealEngine-release-4.11\Engine\Intermediate\ProjectFiles\SubstanceCPU.lib(linkerdetailcachemapping.obj)   UE4
....

All the errors: http://pastebin.com/da3FyXCP

Do you think I need to install any updates on my VS express 2013?

Thanks
Last Edit: May 05, 2016, 08:26:47 am

The problem actually is VS2013. The latest Substance Plugin has libraries that only work in VS2015. I am working on re-providing 2013 Libs, but it's not ready yet. I would grab the VS2015 Community Edition and try to build UE4 from that in the meantime.