解決方法:
模擬器的方式
將之前執(zhí)行的命令:xcrun -sdk iphonesimulator clang -rewrite-objc ViewController.m
替換成為: clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk ViewController.m 即可生成對(duì)應(yīng)的cpp文件。
clanclang編譯錯(cuò)誤: fatal error: 'UIKit/UIKit.h' file not found(本人親測(cè)有效)iOS 終端使用Clang編譯 重寫觀察Runtime源碼 - 碼農(nóng)的青春 - CSDN博客 clang編譯錯(cuò)誤: fatal error: 'UIKit/UIKit.h' ...