在使用
xcrun -sdk iphoneos clang -arch arm64 -rewrite-objc main.m -o main-arm64.cpp
讲.m文件转为.cpp文件的过程中,出现如下报错:
xcrun: error: SDK "iphoneos" cannot be located
main.m:9:9: fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
main.m:9:9: note: did not find header 'UIKit.h' in framework 'UIKit' (loaded from '/System/Library/Frameworks')
如下图选择Command Line Tools 选择xcode版本号后,重新执行xcrun命令即可:
image.png
网友评论