知识点OC文件生成C++文件

2020-01-10  本文已影响0人  Stago
$ cd 当前文件夹 
$ 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
$ cd 当前文件夹 
$ rewriteoc ViewController.m
rewriteoc ViewController.m      

上下两句等同

$ clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk ViewController.m
.cpp .cpp内容
rm -f ~/.bash_profile.swp
cannot create __weak reference in file using manual reference
$ clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk ViewController.m

添加完 -fobjc-arc -fobjc-runtime=ios-8.0.0如下

$ clang -x objective-c -rewrite-objc -fobjc-arc -fobjc-runtime=ios-8.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk ViewController.m
上一篇 下一篇

猜你喜欢

热点阅读