VS2017 is showing fake errors

Hello guys,

First of all, I’m a big noobish person in the area of game making/programming. I tried to learn UE4 one year ago, but I guess I was to young and couldn’t understand many things (like c++ self). Now I decided to reboot my learning sessions on UE4 and started with simple tutorials on the official UE4 site. At the moment I’m stucking a this tutorial, because my c++ ide, Visual Studio 2017 Community, is showing errors, which aren’t errors. For example, I have to import the UCameraComponent which the #include "Camera/CameraComponent.h command, so that IntelliSense is calm. Even if I’m not writing the include, it compiles and does what it has to do. I have to write these includes for every component that’s a special USceneComponent. The problem is, that the includes aren’t tolerated by the compiler, which throws errors all over the screen. Is there any possibility that I could use UE4 with VS2017 normally? I really always stop learning because of this annoying error.

I know that I posted a similar question, but is that really valid, or is it my fault?

Thank you for helping me!

Edit:
Try to declare a UCameraComponent* in the public part of the header file for a pawn, it’s showing a error because it doesn’t exists, and when u write the include in the header file, the GENERATE_BODY() is underlined too.

Can you post some of the errors so myself and others can review them? not really sure what you mean by fake

Starting from 4.15, I believe, Epic made an optimization where you should now include header files of only those files/components that you actually need (before all headers were included in 1 large file and it caused long compilation times). In my projects I had to include a bunch of new header files for each component I use.

I also use VS2017 community edition and its Intellisence (as an alternative you can use Visual Assist). In 4.18 GENERATED_BODY() is finally fixed with a semicolon. Sometimes Intellisence shows some errors/warnings that usually disappear after recompile. But right now looking in my project, I don’t see any Intellisence errors and it all looks perfectly fine. Also here is an article Setting Up Visual Studio for Unreal Engine | Unreal Engine Documentation that may help you to set up VS.

If you are new to UE4, why don’t you learn blueprints first? In most cases using blueprints should not concern performance at all and they are much easier to learn. At the end you can always use blueprint nativization. I personally use C++ mostly to expose some engine’s functionality/functions to blueprints that have not been exposed yet and for my blueprint function library. The rest is pure blueprinting :slight_smile:

Read the edit, please.

If you are just talking about intellisense marking it but compiles fine, that’s just intellisense messing up. It usually does so when you change the header files. Closing and restarting VS fixes it for me.

For me it’s not working… I can’t even do the tutorial without getting errors, like what is this??

if it is so bothering you, why don’t you turn off intellisence? You can use Visual Assist instead.