orthehelper
orthehelper

Reputation: 4079

Many C++ compile errors in iPhone project

i am working on a C++ file in Xcode 4.5 on my iPhone application. for some reason the compiler do not accept C++ statements, it gaves me many errors. why does this happen?

enter image description here

any help would be appreciated! thanks

Upvotes: 0

Views: 102

Answers (1)

bdash
bdash

Reputation: 18308

CAStreamBasicDescription.h and CAXException.h contain C++ code. They can only be included from C++ or Objective-C++ source files.

The errors indicate that the file that is including those two headers is not being compiled as C++ or Objective-C++. The references to Class within the errors suggest that it's being compiled as plain Objective-C instead. Ensure that the file has a .mm file extension if you do intend it to be compiled as Objective-C++, and check that the Type is not set to a non-default value in the Identity and Type section of the File inspector.

Upvotes: 2

Related Questions