转自 :http://stackoverflow.com/questions/10539424/properly-use-objective-c
//declare c++ impl for Obj-C++
#ifdef __cplusplus
class gp_mailer;
#endif
//declare obj-c impl
#ifdef __OBJC__
#ifndef __cplusplus
typedef void gp_mailer;
#endif
#endif
gp_mailer 定义在 google protobuf 协议的 gp_mailer.pb.h 文件中。由于用到C++,在mm文件包含这个头文件不会报错,但如果放到h文件,就会报错。