I had this same problem and it was resolved by changing the Xcode option of "compile sources as: c/objc" to "according to filetype" or just c++.
Topic:
App & System Services
SubTopic:
Core OS
Tags: