Im learning c++ and have some issue. When i open or create any c++ projects i have intelliSense errors, and need “reload all” because the project has been modified out the environement.
I didn’t modify the project i just create new c++ class for show you pics.
If I have any weird engine compile errors like this I always do the following:
Delete everything, that is not absolutely necessary to compile the game:
Binaries
DerivedDataCache
Intermediate
Saved
In root folder YourGameName.sln
Then keep both editors, unreal and visual studio closed. Go to the file explorer, select your YourGameName.uproject file and klick ‘Generate Visual Studio Files’. That takes a small bit of time, depending on your hardware.
After that you can open the .sln and hit Build. Make sure
Build Configuration is ‘Development Editor’
Startup Project is Games->YourGameName.
In error List in VS choose ‘Build Only’. For Unreal Intellisense feels a bit wonky.
To really get C++ up and running I also needed to
install the unreal integration
some more C++ Packages (VS wont stop screaming after you have)
disable ‘Live Coding’ in Unreal
fix 2 compile errors from code that was shipped (really easy ones, vs opens the line if you double klick the error in the error list)
I also always compile the code with the engine closed and only open the engine editor with the ‘Local Windows Debugger’ in VS.
Thank for this complet post is very helpfull for me. I need to delete files and generate visual studio project file for every class or something i create and edit in visual studio?
Add the Cpp files always with tools ‘Add C++’ File in Unreal. This usually works without deleting everything. Deleting everything is something I do if I encounter unexpected compile issues.
In the launcher you must install the Visual Studio Integration Tool (Sorry my OS is configured in German ). Without that tool you get all kinds of different weird errors, because Unreal does not use a standarized C++ Compiler.