iOS 使用clang 编译OC 为C++ 文件
2021-06-25 本文已影响0人
小锤子_
以main.m 为例
首先打开终端 cd 到文件夹目录,(下图勾选的目录)

然后执行
clang -x objective-c -rewrite-objc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk main.m
就能看到 main.cpp 文件了
