# Packaging build error : Starts compiling engine and fails

**URL:** <https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, Packaging, question\
**Created:** [May 27, 2014, 5:07am UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329 "2014-05-27T05:07:38Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [May 27, 2014, 5:07am UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/1 "2014-05-27T05:07:38Z")

</div>

Hi all,

I am trying to package my game but I am getting build errors. I am adding a snippet of the output log here :

```
MainFrameActions: Packaging (Windows): CommandUtils.Run: Run: C:\User\Study\animation\code\ue4\Engine\Binaries\DotNET\UnrealBuildTool.exe TaskBasedLM Win64 DebugGame "C:\Users\User\Documents\Unreal Projects\TaskBasedLMDepot\Experimental\taskbasedlm\TaskBasedLM.uproject" -noxge
MainFrameActions: Packaging (Windows): UnrealBuildTool: Building UnrealHeaderTool...
MainFrameActions: Packaging (Windows): UnrealBuildTool: Target is up to date.
MainFrameActions: Packaging (Windows): UnrealBuildTool: Parsing headers for TaskBasedLM
MainFrameActions: Packaging (Windows): UnrealBuildTool: Code generation finished for TaskBasedLM and took 11.498
MainFrameActions: Packaging (Windows): UnrealBuildTool: WARNING: File 'C:\User\Study\animation\code\ue4\Engine\Source\Developer\SourceControl\Private\SourceControlModule.cpp' doesn't use same 'shared' precompiled header as other files in this module: 'CoreUObject.h' vs 'Engine.h'. This can 
MainFrameActions: Packaging (Windows): greatly impact compile times. Make sure that your module's private PCH header includes the 'largest' shared PCH header that your module uses
MainFrameActions: Packaging (Windows): UnrealBuildTool: Performing 367 actions (max 4 parallel jobs)
MainFrameActions: Packaging (Windows): UnrealBuildTool: PCH.Shared.Core.h.cpp
MainFrameActions: Packaging (Windows): UnrealBuildTool: PCH.Shared.CoreUObject.h.cpp
MainFrameActions: Packaging (Windows): UnrealBuildTool: PCH.Shared.Engine.h.cpp
MainFrameActions: Packaging (Windows): UnrealBuildTool: PCH.Shared.UnrealEd.h.cpp
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Editor\UnrealEd\Public\UnrealEd.h(55) : error C2146: syntax error : missing ';' before identifier 'EditorInit'
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Editor\UnrealEd\Public\UnrealEd.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(529) : error C2378: 'int32' : redefinition; symbol cannot be overloaded with a typedef
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Editor\UnrealEd\Public\UnrealEd.h(55) : see declaration of 'int32'
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(581) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(584) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(594) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(597) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(600) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(600) : error C2338: TypeTests_INT_sign
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\HAL\Platform.h(606) : error C2064: term does not evaluate to a function taking 1 arguments
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\Misc\Timespan.h(82) : error C2061: syntax error : identifier 'int32'
MainFrameActions: Packaging (Windows): UnrealBuildTool: C:\User\Study\animation\code\ue4\Engine\Source\Runtime\Core\Public\Misc\Timespan.h(82) : error C2535: 'FTimespan::FTimespan(void)' : member function already defined or declared

```

How come the engine fails to compile here ?

Many thanks.

Cheers,

darkZ

---

<div class="post-metadata">

**Author:** ![Fscur](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Fscur](https://forums.unrealengine.com/u/Fscur)\
**Post date:** [May 30, 2014, 10:28pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/2 "2014-05-30T22:28:56Z")

</div>

Hey DarkZ,

Could you get it to work?

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [May 30, 2014, 10:29pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/3 "2014-05-30T22:29:57Z")

</div>

I haven’t tried it again yet… Will give it some time soon. I gave up on it until I find some new information on it.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17056905](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17056905](https://forums.unrealengine.com/u/anonymous_user_17056905)\
**Post date:** [July 23, 2014, 5:44pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/4 "2014-07-23T17:44:02Z")

</div>

This situation takes place, if you add UnrealEd to your \*.Build.cs and build the project with the configurations without the editor (f.e. “Development” instead of “Developnment Editor”). Macro WITH\_EDITOR = 0 with such configurations. Look at UnrealEd.h. When WITH\_EDITOR == 0, the part of the file with many #include doesn’t get into the build. Thus, the first error “missing ‘;’ before identifier ‘EditorInit’” occurs. The type int32 is unknown as it is defined in the header file which doesn’t get into the build because of the macro. Other errors happen according to the same scenario.

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 23, 2014, 5:55pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/5 "2014-07-23T17:55:00Z")

</div>

Ah that seems like a great answer. I will try it out and get back to you. Thanks !

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 23, 2014, 5:58pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/6 "2014-07-23T17:58:50Z")

</div>

Would I define WITH\_EDITOR in my Game.h file ?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17056905](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17056905](https://forums.unrealengine.com/u/anonymous_user_17056905)\
**Post date:** [July 23, 2014, 6:13pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/7 "2014-07-23T18:13:53Z")

</div>

I think this is not a corrent decision. WITH\_EDITOR is defined by UBT. Look at …\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs. I also think that you don’t need UnrealEd for configurations without the editor. It doesn’t make any sense. Add it optionally in your \*.Build.cs for configurations with the editor

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 23, 2014, 11:08pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/8 "2014-07-23T23:08:51Z")

</div>

I checked and I don’t have UnrealEd in my build.cs. file So I think the issue is also that I need to build my project in Development mode. Howevever I get the following error as its not able to find the symbol UNREALED\_API

1\> Module.Engine.16\_of\_41.cpp  
1\>C:\User\study\animation\code\UnrealEngine4.2\Engine\Source\Editor\UnrealEd\Public\UnrealEd.h(54): error C2146: syntax error : missing ‘;’ before identifier ‘EditorInit’

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17056905](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17056905](https://forums.unrealengine.com/u/anonymous_user_17056905)\
**Post date:** [July 24, 2014, 9:51am UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/9 "2014-07-24T09:51:09Z")

</div>

It seems that a certain file includes UnrealEd.h. The scenario with WITH\_EDITOR == 0 happens for configurations without the editor. That is why such things as UNREALED\_API, int32 etc are not defined.

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 24, 2014, 3:43pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/10 "2014-07-24T15:43:05Z")

</div>

public TaskBasedLM(TargetInfo Target)  
{

```
        MinFilesUsingPrecompiledHeaderOverride = 1;
        bFasterWithoutUnity = true;

		PublicDependencyModuleNames.AddRange(new string[] { 
            "Core", 
            "CoreUObject", 
         // "Engine", 
          // "EditorStyle",
            "Slate",
			"SlateCore",
            "InputCore", 
         // "PropertyEditor",
			"BlueprintGraph",
            "AnimGraph" });

        PrivateDependencyModuleNames.AddRange(new string[] { 
        // "PropertyEditor"
        });
        
        PrivateIncludePathModuleNames.AddRange(
            new string[] {
		//	"PropertyEditor",
          // "EditorStyle"
			}
        );

        DynamicallyLoadedModuleNames.AddRange(
            new string[] {
			//	"PropertyEditor"
			}
        );

		
		MinFilesUsingPrecompiledHeaderOverride = 1;
		bFasterWithoutUnity = true;

		// Uncomment if you are using Slate UI
		// PrivateDependencyModuleNames.Add("Slate");
		
		// Uncomment if you are using online features
		// PrivateDependencyModuleNames.Add("OnlineSubsystem");
		// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
		// {
		// if (UEBuildConfiguration.bCompileSteamOSS == true)
		// {
		// DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
		// }
		// }

        LoadANNLibrary(Target);
	}

```

This is what my build.cs. looks like. I have commented a bunch of modules with the hope to find the one which is including UnrealEd.h My project does not include UnrealEd.h anywhere though

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 24, 2014, 3:54pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/11 "2014-07-24T15:54:04Z")

</div>

I have discovered that a precompiled header for UnrealEd comes into play as soon as I include AnimGraph module … And then I get a bunch of errors. AnimGraph depends on UnrealEd, so that explains it. However I need AnimGraph as I implement a custom AnimGraphNode in my project.

I wonder if its possible to exclude certain classes depending on the build type because there’s really no need to build an AnimGraphNode for a packaged project.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_17056905](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_17056905](https://forums.unrealengine.com/u/anonymous_user_17056905)\
**Post date:** [July 24, 2014, 9:45pm UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/12 "2014-07-24T21:45:44Z")

</div>

You need to make another module. Look at answer:

> **[What is the proper method for extending the Editor Engine?](https://forums.unrealengine.com/questions/41509/extending-editor-engine.html)**
>
> Hi there I have successfully extended the editor engine to our own version which compiles and works fine in the editor. But I am having issues getting it to compile for the standalone build (development or debug). Whats the intended work flow for...

---

<div class="post-metadata">

**Author:** ![darkZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkZ](https://forums.unrealengine.com/u/darkZ)\
**Post date:** [July 25, 2014, 12:37am UTC](https://forums.unrealengine.com/t/packaging-build-error-starts-compiling-engine-and-fails/284329/13 "2014-07-25T00:37:56Z")

</div>

This fixed all my problems. I can now compile to both the editor target and package my game as well. I had to cook my content through the editor first. Today I learnt a lot of new things about the build setup. Thanks for your time and patience.
