There are three solutions to active Objective C++ compilations
- By Objective C++ default file extention: .mm — This a most security way to active Objective C++ complilation. Xcode will set automatically the corresponding runtime target for the project at build time.
- Set Xcode project build settings(under GCC 4.2 Language) — Either add -x objectiveC++ to « Other C Flags » or set « Compile Sources As » to « ObjectiveC++ »
- Select the file from Xcode’s Groups & Files list, select File->Get Info and changge the file type to « Sourcecode.cpp.objcpp ».