4.15 C++ Transition Guide

Hi guy,

since 4.15, we are not able to build linux dedicated server on windows. Does someones succeed in getting a linux dedicated server build in shipping mode on windows platform?
We found multiple topics on the same errors with no solution.

I raised a answerhub : https://answers.unrealengine.com/questions/668639/linux-shipping-windowsh-missing-bootstrappackagedg.html with our issue, but if someone can help it will be great.

thanks,

Error description : BootstrapPackagedGame.h(5,10): fatal error : ‘windows.h’ file not found
Another hub ticket on the same issue

So first I would like to point to Epic’s IWYU Reference Guide, but then I would like to ask for a bit of clarity on it.

Under ‘What it Means to IWYU’ it states:

"All header files include their required dependencies."

For those of you experienced with IWYU, what does it mean by this? In practice currently I am forward declaring most of my dependencies. So the top of my Actor’s header looks like this:



#include "CoreMinimal.h"

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

class UTextRenderComponent;
class USkeletalMeshComponent;

UCLASS()
class AMyActor: public AActor

But the way I am reading this I should be including the respective headers like so:



#include "CoreMinimal.h"

#include "Components/TextRenderComponent.h"
#include "Components/StaticMeshComponent.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"

UCLASS()
class AMyActor: public AActor

Is this the way it should be? Wouldn’t this cause issues with including what you don’t use in any class that included MyActor.h?

@Spiris You’re fine. You can forward declare any classes that you simply use as pointers / doesn’t require actual functionality to be pulled in.

Forward declarations are perfectly fine, you don’t have change anything here.

Previously most of the engine classes included huge headers like Engine.h (the bigger one, there are 2 of them…) which includes insane amount of headers, but given class utilized only like 1 or 2 headers. It was slowing down compilation of the entire engine.
And right now engine classes include only headers they actually use. You’re already doing that :slight_smile: