Reputation: 4079
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?
any help would be appreciated! thanks
Upvotes: 0
Views: 102
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