Error in UnrealNetwork.h when using C++ Replication

When I try to Follow The C++ Replication samples at A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums And Recreate the exact class at actor replication I get the following error in UnrealNetwork.h.

error: use of undeclared identifier 'FLogCategoryLogNet'
[2014.11.11-11.06.59:293][149]CompilerResultsLog: Info UE_LOG(LogNet, Fatal,TEXT("Attempt to replicate property '%s.%s' in C++ but class '%s' is not a child of '%s'"), *PropClass->GetName(), *PropName.ToString(), *CallingClass->GetName(), *PropClass->GetName());

My code looks as follows: ReplicatedActor.h

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once
#include "Core.h"
#include "GameFramework/Actor.h"
#include "ReplicatedActor.generated.h"

class DESOLATION_API AReplicatedActor : public AActor

    /** A Replicated Boolean Flag */
    uint32 bFlag:1;
    /** A Replicated Array Of Integers */
    TArray<uint32> IntegerArray;


// Fill out your copyright notice in the Description page of Project Settings.

#include "Desolation.h"
#include "ReplicatedActor.h"
#include "UnrealNetwork.h"

AReplicatedActor::AReplicatedActor(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
    bReplicates = true;

void AReplicatedActor::GetLifetimeReplicatedProps(TArray<FLifetimeProperty> &OutLifetimeProps) const
    DOREPLIFETIME(AReplicatedActor, bFlag);
    DOREPLIFETIME(AReplicatedActor, IntegerArray);

I am using Engine version 4.5.1 on OSX 10.10 Yosemite

Is this a bug in the engine, or am I doing something wrong

Try putting

#include “UnrealNetwork.h”

in the .h file!

#pragma once

#include "UnrealNetwork.h"

#include "GameFramework/Actor.h"
#include "ReplicatedActor.generated.h"


Nope, still got the same errors
Also the generated headers should always be last in the include lines

You’re looking for this line that declares that Log variable


It is defined in EngineLogs.h

Try making sure that is included, either directly, or via the nuclear option of the dreaded “engine.h”!

ah yea oops copy paste typo, well did you try what Josh suggested?

If you go into YourGame.h

are you using EngineMinimal or Engine.h?

Have you tried Engine.h?

This solved the compile error for me, that i got after including UnrealNetwork.h

Is there a reason why EngineLogs.h isn’t included by UnrealNetwork.h? Is it expected that people override this declaration?

Did you ever figure this out? I am experiencing this with a replicated variable running on a Linux server. Everything compiles fine but when it runs :

Attempt to replicate property ‘ObjectProperty /Script/…’ that was not tagged to replicate!