oc 与 swift 混编,所遇问题记录

当加入swift文件时,出现以下错误提示:

Typedef redefinitionwithdifferent types ('uint_least16_t'(aka'unsigned short') vs'char16_t')

Typedef redefinitionwithdifferent types ('uint_least32_t'(aka'unsigned int') vs'char32_t')

问题出处:

#elif!defined(__cplusplus) || __cplusplus < 201103L

typedefuint_least16_tchar16_t;

typedefuint_least32_tchar32_t;

#endif

当删除  || __cplusplus < 201103L   时,问题不再出现


解决办法:

1.升级Xcode至9.4.1;

你可能感兴趣的:(oc 与 swift 混编,所遇问题记录)