I'm running OS 10.11, and my Xcode version is 7.2.
All of the sudden my project fails to compile in Xcode. Xcode seems to be confused about the file type -- I'm getting errors that indicate my code is being compiled as C++ even tho all the files in my project are labeled as type Objective-C code. Here are some of the errors that occur in deeply-nested system header files:
Unknown type name 'namespace' 'utility' file not found (from #include_next <utility>)
I've verified that all the files are listed as Objective-C. I've even tried changing them to Objective-C++, by 'Identity and Type', and by also changing the extensions to .mm, but this introduces an even bigger set of mysterious compile errors deep in system-level header files, such as:
Use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'? No member named 'memchr' in the global namespace
I've tried reinstalling Xcode a couple times. Any suggestions?
Further mystifying is that I have a different Mac with the same version of OS X, same version of Xcode, and with the exact same code (verified thru git), and it compiles fine.
I created a new project, copied all the files and configuration to the new project, and the issue resolved itself.