我正在使用macOS 10.15.7为macOS arm64架构(非iOS)构建一个简单的hello world C++程序。 我已经安装了Xcode 12。 我尝试了以下操作:
xcodebuild -project TestApp.xcodeproj clean build ARCHS=arm64 EXCLUDED_ARCHS=""
但是收到了以下错误:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
以及其他类似的错误。
我想我可以从我的x86_64 mac交叉构建即将推出的基于ARM的mac,但似乎不起作用。