Xcode make和xcrun版本的强制SDK错误 我试图用XC++和命令行工具12.2在10.15系统上用C++编写代码< >代码> 。它一直希望使用不支持arm64的10.15 SDK。因此,我得到了体系结构不受支持的错误

Xcode make和xcrun版本的强制SDK错误 我试图用XC++和命令行工具12.2在10.15系统上用C++编写代码< >代码> 。它一直希望使用不支持arm64的10.15 SDK。因此,我得到了体系结构不受支持的错误,xcode,macos,arm64,Xcode,Macos,Arm64,我的make文件包含: SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk 而build命令包含: SDKROOT=/

我的make文件包含:

SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
而build命令包含:

SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
奇怪的是:

xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

xcrun --show-sdk-version
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
有什么想法吗?以前在Xcode 11.7上有一个干净的安装,然后我复制了12.2(替换了11.7)。我已经验证了SDK(v15)存在于
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.SDK
,并且OSX11 SDK也在SDK文件夹中

x86_64的构建工作正常