Barrel (intellisense only) problem; "pointer to incomplete class type is not allowed"

Hi. My Barrel UStaticMeshComponent refuses to be picked up as properly setup by the VS2017 intellisense.

I’m a few videos forward of this one as it compiles fine so the #include for GameplayStatics is definitely working but doesn’t seem to be picked up by intellisense. Has anyone else had a similar issue and potential fix?

(Unreal Engine 4.18 with VS2017 and my github is https://github.com/NODZZ/04_BattleTank )

Edit: and typically for me, the problem is solved a few lectures down the line :smiley: (specifically when the tank barrel is made into its own class)

this problem happens to me at every lecture…
#include “Runtime/Engine/Classes/Components/StaticMeshComponent.h” at the start of the cpp to fix it.
it says that the compiler doesn’t know which functions barrel has and as such cannot use them (in this case it doesn’t know what GetComponentLocation from ustaticmeshcomponent is)

Ugh. I get that they made the program more efficient by making people include what they need, but it throws me off so often. I started the challenge thinking it would be easy. Barrel-> “GetTheLocationSomeHow(),” but it kept showing red squigglies so I thought I had the wrong idea. I ended up searching around until I finally gave up, continued watching, and it came full circle back to what I originally thought.

actually Components/StaticMeshComponent.h is enough to solve this.

4 Likes

Privacy & Terms