I'm adding some features to a project that already exist. It works as expected.
Then I added few files from an open library to that project.
Now, Xcode fails to compile the whole project.
Investigating why, I found out that the problem is the "Compile source as" flag, it is set by default to "Objective-C++".
Switching that flag to other value makes Xcode to complain. Hundreds of errors in any case.
I have the idea the previous dev did this to avoid renaming .c, .cpp, .m to .mm. He is not here anymore. So, hard to say.
Any idea how to solve this?
I see few options:
I went thru the easiest way: forcing Xcode to compile a specific file as Objective-C, but the entire project as Objective-C++.
Added the compiler flag
-x objective-c to each file in Build Phases> 'Compile source as'