OtherCompilationError(5)

Hi everyone,

I’ve a problem when I try to compile my code. This is my Output :

1>------ Début de la génération : Projet : ATOMICS_2, Configuration : Development_Game x64 ------
1>  Parsing headers for ATOMICS_2
1>    Running UnrealHeaderTool "D:\UDKProj\ATOMICS_2\ATOMICS_2.uproject" "D:\UDKProj\ATOMICS_2\Intermediate\Build\Win64\ATOMICS_2\Development\UnrealHeaderTool.manifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
1>  D:/UDKProj/ATOMICS_2/Source/ATOMICS_2/Public/BlockAir.h(13) : 'BlockAir' can't be compiled: Parent class 'Block' has errors
1>Error : Failed to generate code for ATOMICS_2 - error code: OtherCompilationError (5)
1>  UnrealHeaderTool failed for target 'ATOMICS_2' (platform: Win64, module info: D:\UDKProj\ATOMICS_2\Intermediate\Build\Win64\ATOMICS_2\Development\UnrealHeaderTool.manifest).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3073: La commande ""D:\Program Files\UE4\Epic Games\4.11\Engine\Build\BatchFiles\Build.bat" ATOMICS_2 Win64 Development "D:\UDKProj\ATOMICS_2\ATOMICS_2.uproject" -waitmutex" s'est arrêtée avec le code -1.
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========

And this is my ABlock class :

UCLASS()
class ATOMICS_2_API ABlock : public AActor
{
	GENERATED_BODY()

protected:
	virtual MeshData FaceDataUp(AChunk& chunk, int x, int y, int z, MeshData meshdata);
	virtual MeshData FaceDataDown(AChunk& chunk, int x, int y, int z, MeshData meshdata);
	virtual MeshData FaceDataNorth(AChunk& chunk, int x, int y, int z, MeshData meshdata);
	virtual MeshData FaceDataSouth(AChunk& chunk, int x, int y, int z, MeshData meshdata);
	virtual MeshData FaceDataEast(AChunk& chunk, int x, int y, int z, MeshData meshdata);
	virtual MeshData FaceDataWest(AChunk& chunk, int x, int y, int z, MeshData meshdata);

public:	

	UPROPERTY(EditAnywhere, BlueprintReadWrite,Category="Attributes")
		TArray<FVector> vertexArray;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Attributes")
		TArray<int32> faceDataArray;

	// Sets default values for this actor's properties
	ABlock();

	virtual bool IsSolid(EDirection direction);


	virtual MeshData BlockData(AChunk& chunk, int x, int y, int z, MeshData meshdata);

	// Called when the game starts or when spawned
	virtual void BeginPlay() override;
	
	// Called every frame
	virtual void Tick( float DeltaSeconds ) override;

	
	
};

I don’t see what is the problem. Can you help me ?

I think my problem is about circular dependency but I can’t avoid them, I don’t know why…

Whats in line 13 of BlockAir.h?

This is my BlockAir.h :

#pragma once

#include "Block.h"
#include "BlockAir.generated.h"


/**
 * 
 */
UCLASS()
class ATOMICS_2_API ABlockAir : public ABlock
{ //this line make an error
	GENERATED_BODY()
	
public:
	
	
	MeshData BlockData(AChunk& chunk, int x, int y, int z, MeshData meshdata) override;

	bool IsSolid(EDirection direction) override ;
	
};

I think it’s about circular dependencies between my Block.h and an other file called Chunk.h
This is the begining of these files :
//Block.h

#pragma once

#include "GameFramework/Actor.h"

#include "Chunk.h"
#include "MeshData.h"

#include "Block.generated.h"


class ATOMICS_2_API AChunk;

UCLASS()//...


//Chunk.h
#pragma once

#include "GameFramework/Actor.h"

#include "MeshData.h"
#include "BlockAir.h"
#include <vector>
#include <memory>

#include "Runtime/Engine/Public/DynamicMeshBuilder.h"
#include "Chunk.generated.h"

#define _CHUNK_SIZE 16

class ATOMICS_2_API ABlock;

UCLASS()//...

try changing int to int32