VS 2017 IntelliSense shows fake errors in error-free code

I had to import the header for each component…

Hello Guys,

Yesterday I installed UE 4.16.2 and started programming with vs community 2017 (.NET Development, C++ Development packages are installed (with Win 8.1 SDK)). I followed one tutorial about player input in pawns in the official docs. After the class was written, IntelliSense shows 7 “Errors”, which aren’t errors, because UE4 can compile the code without any problems and the result was as expected.

Code lines where the “error” exists:

// OurVisibleComponent is a pointer to a UStaticMeshComponent
OurVisibleComponent->SetupAttachment(RootComponent);
float CurrentScale = OurVisibleComponent->GetComponentScale().X;
OurVisibleComponent->SetWorldScale3D(FVector(CurrentScale));

// InputComponent is a pointer to a AActor::InputComponent
InputComponent->BindAction("Grow", IE_Pressed, this, &AMyPawn::StartGrowing);
InputComponent->BindAction("Grow", IE_Released, this, &AMyPawn::StopGrowing);
InputComponent->BindAxis("MoveX", this, &AMyPawn::Move_XAxis);
InputComponent->BindAxis("MoveY", this, &AMyPawn::Move_YAxis);

Error for all lines is the same:

E0393	pointer to incomplete class type is not allowed

The problem is that autocomplete is kinda disabled during the error exists. And programming in UE4 without autocomplete is… pure pain.

Did I forget to install something? I appreciate any answer!

That’s valid isn’t it? If you don’t include the object’s header, then you’re just forward declaring and the compiler doesn’t know where the object’s definition is.

I found changing the configuration away from DeveleoperEditor to DebugGame and then back again fixed this issue for me.

Doesn’t help me…

Not really, because it does compile, so the compiler DOES know where to find the .h/.cpp parts…