// 原代码
#import <Foundation/Foundation.h>
@interface iOSUtilUnity3dBridge : NSObject
extern "C" // Expected identifier or '('
{
const char* getMessage(const char *str);
}
@end
改为
#import <Foundation/Foundation.h>
@interface iOSUtilUnity3dBridge : NSObject
#ifdef __cplusplus
extern "C"{
#endif
const char* getMessage(const char *str);
#ifdef __cplusplus
}
#endif
@end