Is it normal to have a large number of errors in Visual Studio 2022 when opening most Unreal Engine .cpp and .h files?

To be more specific, I open the ORIGINAL files made by the developers of the engine, and they can be that 100 errors and more, I ask because the code does not work, which should work, so I think that perhaps you need to reinstall both UE and studio, and then install again. Studio by the way I have already tried to reinstall - did not help. Installed even specifically on tutorials on the Internet for proper integration with the engine, still errors do not disappear. I remind you that the files are original, I did not change or touch anything in them, the project in ue clean form, just created.

On the screenshot of the file UObjectBase.cpp selected randomly - 194 errors, as you can see, to me this is definitely some kind of bug and it should not be like this, what is the problem?

Hi, general problem is that Visual Studio sometimes doesn’t recognize some Unreal Engine macros and treat them as errors, but these are not real errors.

There is an addon/extension to Visual Studio to make it works with Unreal Engine code slightly better, but I use Rider - which is paid, but works flawlessly to write and browse UE code.

Did you open the project through the solution file (sln) or just open up a bare cpp / header file without the surrounding project?

VS needs reference to unreal engines files to be able to not throw errors. It looks like direct file opening to me.

Hi! I didn’t know what sln files are and how to open them, but after reading your answer I tried to open c++ files not through the solution browser, but through ue editor from the Engine C++ Classes folder and when I opened them this way - no errors. In general, these errors only confused me and led me off the right path, as I realized that it is my code that is not working and not the problem in these obscure errors, thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.