I’ve had false errors when trying to develop C++ in Xcode. I’ve tried multiple versions of Xcode including the Xcode 8 and the new beta of Xcode 9. Im currently using 4.16.3, but this problem has persisted in Unreal for a few versions.
My steps to reproduce this problem are as follows:
Download unreal from the launcher
Create a new C++ project, Ive been using the first person template
Open up Xcode with the button inside of the Editor
Wait for Xcode to index the project
Open a file with some code in it and more times than not there are errors (but no errors when compiling)
Heres a picture of some of the errors that Im getting, as you can see this is valid code and is actually all from the template, and everything builds fine.
I am having the same issue. It’s exesting with all recents versions of UE4 and Xcode beta from 9.3 to 9.5… as well as 8.3.3.
I saw in in one response to the problem suggestion about bulding the ProjectName_Index target. Have yet to try that myself. Have you tried that ?
I finally found a way to fix the Xcode indexing problem for me which seemed to be the same as you are having.
What I had to do was to Build my ProjectName_Index target and first I seemed to get errors regarding not using C++14, then I changed the project settings to use C++14 instead of C++11 and after Build of ProjectName_Index then the indexing is back and no errors are shown any more.
Great to hear… yeah I notice that it’s changed back. In the source c++14 is widely referenced so I guess that should be the default.
I took a look at the source code of the builder.
The problem is that in XcodeProject.cs there CLANG_CXX_LANGUAGE_STANDARD is set to be c++0x but should be c++14.
With that change the “Refresh Xcode Project” should now work at least this works…
./GenerateProjectFiles.sh -project=“location/project.uproject” -game