gpt4 book ai didi

macos - 仅安装命令行工具时如何获取当前 MacOSX SDK 的路径?

转载 作者:行者123 更新时间:2023-12-01 11:23:21 26 4
gpt4 key购买 nike

我们正在尝试定位我们的一些 OSX 机器 (10.11) 使用的当前平台 SDK。
在这些机器上,仅安装命令行工具 ,不是完整的 Xcode 应用程序。

查找 SO,我们能够找到命令 xcrun --show-sdk-path , 打印出一个空行。

另一方面,xcrun --show-sdk-version正确显示 10.11 .

有没有办法找到我们编译任务使用的 SDK 的路径?

最佳答案

怎么样

xcode-select --print-path

手册页说:

Prints the path to the currently selected developer directory. This is useful for inspection, but scripts and other tools should use xcrun(1) to locate tool inside the active developer directory.



在仅安装了命令行工具的 Mac 上,我得到:
/Library/Developer/CommandLineTools

和 xcrun --show-sdk-path 给了我和你一样的空行。

关于macos - 仅安装命令行工具时如何获取当前 MacOSX SDK 的路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39772978/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com