Actually running this on master branch, not 4.9. (I need VS2015.)
In file proj_dir/Source/Polygon4/Modification.h I include file proj_dir/Source/Polygon4/UI/Modification.h. And I see an error from UHT.
Source file:
#include "GameFramework/Actor.h"
#include <UI/Modification.h>
#include "Modification.generated.h"
UCLASS()
class POLYGON4_API AModification : public AActor
{
GENERATED_BODY()
public:
AModification();
};
Error:
29>------ Build started: Project: Polygon4, Configuration: Development_Editor x64 ------
29> Performing full C++ include scan (building a new target)
29> Parsing headers for Polygon4Editor
29> Running UnrealHeaderTool "K:\AIM\Polygon4\Polygon4.uproject" "K:\AIM\Polygon4\Intermediate\Build\Win64\Polygon4Editor\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error"
29>K:/AIM/Polygon4/Source/Polygon4/Modification.h(1): error : Class 'AModification' contains a dependency (#include or DependsOn) to itself
29>Error : Failed to generate code for Polygon4Editor - error code: OtherCompilationError (5)
29> UnrealHeaderTool failed for target 'Polygon4Editor' (platform: Win64, module info: K:\AIM\Polygon4\Intermediate\Build\Win64\Polygon4Editor\Development\UnrealHeaderTool.manifest).
29>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: The command "k:\UnrealEngine\Engine\Build\BatchFiles\Build.bat Polygon4Editor Win64 Development "K:\AIM\Polygon4\Polygon4.uproject" -waitmutex" exited with code -1.