x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Packaging build error : Starts compiling engine and fails

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

Product Version: Not Selected
Tags:
more ▼

asked May 27 '14 at 05:07 AM in Packaging & Deployment

avatar image

darkZ
263 18 21 37

avatar image Fscur May 30 '14 at 10:28 PM

Hey DarkZ,

Could you get it to work?

avatar image darkZ May 30 '14 at 10:29 PM

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.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jul 23 '14 at 05:44 PM

avatar image

mc
46 1 3 9

avatar image darkZ Jul 23 '14 at 05:55 PM

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

avatar image darkZ Jul 23 '14 at 05:58 PM

Would I define WITH_EDITOR in my Game.h file ?

avatar image mc Jul 23 '14 at 06:13 PM

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

avatar image darkZ Jul 23 '14 at 11:08 PM

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'

avatar image mc Jul 24 '14 at 09:51 AM

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.

avatar image darkZ Jul 24 '14 at 03:43 PM
 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

avatar image darkZ Jul 24 '14 at 03:54 PM

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.

avatar image mc Jul 24 '14 at 09:45 PM
avatar image darkZ Jul 25 '14 at 12:37 AM

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.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question