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"

Rocket build expects FILE.h to be first include... but building from VS expects MODULE.h instead

Hi guys... trying to create a rocket build for my plugin (for testing purposes) and this error comes


 Performing full C++ include scan (building a new target)
 Creating makefile for UE4Editor (no existing makefile)
 Parsing headers for UE4Editor
   Running UnrealHeaderTool "C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\HostProject.uproject" "C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
 Reflection code generated for UE4Editor in 16.3807803 seconds
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\PaperZDAnimBP.cpp(1): error: Expected PaperZDAnimBP.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\PaperZDAnimInstance.cpp(1): error: Expected PaperZDAnimInstance.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\PaperZDCharacter.cpp(1): error: Expected PaperZDCharacter.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\AnimNodes\PaperZDAnimNode.cpp(1): error: Expected PaperZDAnimNode.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\AnimNodes\PaperZDAnimNode_Root.cpp(1): error: Expected PaperZDAnimNode_Root.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\AnimNodes\PaperZDAnimNode_State.cpp(1): error: Expected PaperZDAnimNode_State.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\AnimNodes\PaperZDAnimNode_Transition.cpp(1): error: Expected PaperZDAnimNode_Transition.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\Notifies\PaperZDAnimNotify.cpp(1): error: Expected PaperZDAnimNotify.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\Notifies\PaperZDAnimNotifyCustom.cpp(1): error: Expected PaperZDAnimNotifyCustom.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\Notifies\PaperZDAnimNotifyState.cpp(1): error: Expected PaperZDAnimNotifyState.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\Notifies\PaperZDAnimNotify_Base.cpp(1): error: Expected PaperZDAnimNotify_Base.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZD\Private\Notifies\PaperZDAnimNotify_PlaySound.cpp(1): error: Expected PaperZDAnimNotify_PlaySound.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\AssetTypeActions\AssetTypeActions_PaperZDAnimBP.cpp(1): error: Expected AssetTypeActions_PaperZDAnimBP.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Compilers\PaperZDCompilerContext.cpp(1): error: Expected PaperZDCompilerContext.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Editors\PaperZDAnimBPEditor.cpp(1): error: Expected PaperZDAnimBPEditor.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Editors\PaperZDStateViewportClient.cpp(1): error: Expected PaperZDStateViewportClient.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Editors\Slate\SPaperZDAnimNotifyPanel.cpp(1): error: Expected SPaperZDAnimNotifyPanel.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Editors\Slate\SPaperZDConfirmDialog.cpp(1): error: Expected SPaperZDConfirmDialog.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Editors\Slate\SPaperZDStateViewport.cpp(1): error: Expected SPaperZDStateViewport.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Factories\PaperZDAnimBPFactory.cpp(1): error: Expected PaperZDAnimBPFactory.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDAnimGraph.cpp(1): error: Expected PaperZDAnimGraph.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDAnimGraphSchema.cpp(1): error: Expected PaperZDAnimGraphSchema.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDAnimTransitionGraph.cpp(1): error: Expected PaperZDAnimTransitionGraph.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDAnimTransitionGraphSchema.cpp(1): error: Expected PaperZDAnimTransitionGraphSchema.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDNotifyGraph.cpp(1): error: Expected PaperZDNotifyGraph.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\PaperZDStateMachineConnectionDrawingPolicy.cpp(1): error: Expected PaperZDStateMachineConnectionDrawingPolicy.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\PaperZDAnimGraphNode.cpp(1): error: Expected PaperZDAnimGraphNode.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\PaperZDAnimGraphNode_Root.cpp(1): error: Expected PaperZDAnimGraphNode_Root.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\PaperZDAnimGraphNode_State.cpp(1): error: Expected PaperZDAnimGraphNode_State.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\PaperZDAnimGraphNode_Transition.cpp(1): error: Expected PaperZDAnimGraphNode_Transition.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\PaperZDTransitionGraphNode_Result.cpp(1): error: Expected PaperZDTransitionGraphNode_Result.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\Slate\SPaperZDAnimGraphNode_Root.cpp(1): error: Expected SPaperZDAnimGraphNode_Root.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\Slate\SPaperZDAnimGraphNode_State.cpp(1): error: Expected SPaperZDAnimGraphNode_State.h to be first header included.
 C:\Users\DarkK\Documents\Unreal Projects\PaperZD_Builds\4.18_build\HostProject\Plugins\PaperZD\Source\PaperZDEditor\Private\Graphs\Nodes\Slate\SPaperZDAnimGraphNode_Transition.cpp(1): error: Expected SPaperZDAnimGraphNode_Transition.h to be first header included.
 ERROR: Build canceled.


The problem is that... if i change EVERY include from my cpp.. then the project won't compile because it expects the Module.h to be the first included... so the point... is that i cannot build the project on rocket and on the editor at the same time...

Product Version: UE 4.18 Preview
Tags:
more ▼

asked Oct 20 '17 at 09:02 PM in Bug Reports

avatar image

HeavyBullets
277 11 19 32

avatar image modcom77 Oct 25 '17 at 07:01 PM

Having pretty much the same issue...I'm stumped.

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

1 answer: sort voted first

Since 4.18, all plugins are supposed to use IWYU. You can see how it works here: https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/

It's not enforced properly, so building from VS might still work without having it set, while attempting to package the plugin overrides it to be enabled.

more ▼

answered Oct 25 '17 at 07:08 PM

avatar image

Zeblote
103 6 13 18

avatar image HeavyBullets Oct 25 '17 at 07:33 PM

mmm i think that could be it... but that means my 4.18 project is not using IWYU?

avatar image Zeblote Oct 25 '17 at 08:33 PM

Maybe? I don't know how your project looks like. One of the basic rules of IWYU is that each .cpp includes the .h with the same name first, if there is one.

avatar image HeavyBullets Oct 25 '17 at 08:35 PM

i mean, just created a blank c++ project on 4.18 preview 2 (if i remember correctly), failed inmediately as the MODULE.h was expected first

avatar image Zeblote Oct 25 '17 at 08:39 PM

Do you see this line in your Build.cs file?

 PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

If not, try adding it.

avatar image HeavyBullets Oct 25 '17 at 08:42 PM
 PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

exists on the game not on the plugin.. could that be the issue?

avatar image Zeblote Oct 25 '17 at 08:43 PM

Yeah, try adding it in the plugin too.

(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