天天看點

Expected identifier or '(' Unknown type name 'NSString'

今天導入三方庫,報了Expected identifier or ‘(’ 錯誤和 Unknown type name ‘NSString’

看圖

Expected identifier or '(' Unknown type name 'NSString'

全是NSObjCRuntime.h NSZone.h這些系統的頭檔案

解決方法:

target ->Build Settings ->Complie Sources As 選中Object -C 即可編譯成功,也可以試試其他的,

前幾天遇到這個錯誤,再次記錄一下