http://stackoverflow.com/questions/8588734/unknown-type-name-class-did-you-mean-class
Unknown type name 'class'; did you mean 'Class'?
-
Select "Compile Source As" variable in compiler settings and set its value to "Objective-C++" i.e Build Settings->Apple LLVM 7.0 - Language->Compile Source As->Objective-C++ (in Xcode 7.1)
-
Change the relevant files which include a C++ header file from .m to .mm (sometimes you need to change all .m to .mm).
-
If you face incompatible type errors, explicitly do type casting of the required type. These errors might not have shown up when it was .m file.
本文指导您如何解决Objective-C与C++文件混编时出现的未知类型名错误,包括设置编译源代码为Objective-C++,修改相关文件扩展名,并在遇到不兼容类型错误时进行类型显式转换。
609

被折叠的 条评论
为什么被折叠?



