Reputation: 33
I am trying to build a Unreal Project in Xcode. But I am facing various issues while building it. One of the prominent reason is Example.h
should be first header included. But I have already included it as a first header. Can someone tell me how to configure Xcode for unreal projects, because it even doesn't recognize the thing that are defined in unreal.
This is the error file.
Setting up Mono
Building TanksEditor...
2017-07-09 12:06:52.427 defaults[35773:349710]
The domain/default pair of (com.apple.dt.Xcode, IDEBuildOperationMaxNumberOfConcurrentCompileTasks) does not exist
Running command : Engine/Binaries/DotNET/UnrealBuildTool.exe TanksEditor Mac Development /Users/rishabhsharma/Documents/Unreal Projects/Tanks/Tanks.uproject
Compiling game modules for hot reload
Parsing headers for TanksEditor
Running UnrealHeaderTool "/Users/rishabhsharma/Documents/Unreal Projects/Tanks/Tanks.uproject" "/Users/rishabhsharma/Documents/Unreal Projects/Tanks/Intermediate/Build/Mac/TanksEditor/Development/TanksEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Reflection code generated for TanksEditor in 10.0231033 seconds
/Users/rishabhsharma/Documents/Unreal Projects/Tanks/Source/Tanks/Tank.cpp(1): error: Expected Tank.h to be first header included.
Build canceled.
Command /Users/Shared/Epic Games/UE_4.16/Engine/Build/BatchFiles/Mac/Build.sh failed with exit code 1
I tired a lot of things but did'nt find a solution.
Upvotes: 1
Views: 1783
Reputation: 3
there is no problem in Xcode. The "tank.h" header file missing in Tank.cpp. It should be included at the top of your file.
Upvotes: 0
Reputation: 88
There no problem with Xcode though the order of your #include does matter so change Tank.h as the FIRST include then it should work out so #include "Tank.h" should go first and at the top. Please keep me updated so I can help you.
Upvotes: 1
Reputation: 10107
UE build error is buggy, one possible error could be your xxx.generated.h
isn't the last header included, which it should be.
Upvotes: 0