Where are the C headers in MacOS Mojave?

前端 未结 3 1141
深忆病人
深忆病人 2020-12-19 05:06

It seems that Apple keeps on moving their tools around and the old solution of installing the command line tools are with using xcode-select --install doesn\'t

3条回答
  •  半阙折子戏
    2020-12-19 06:00

    Xcode now supports multiple SDKs and multiple installations of Xcode. The SDKs are inside Xcode.app, and Xcode.app is installed by default in Applications but may be elsewhere.

    xcrun --show-sdk-path will show a default SDK path, but there may be others. For example, one possible path is /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk. From there, usr/include holds common public headers such as the standard C headers, and various Apple headers are in frameworks under System.

    In /Applications/Xcode.app/Contents/Developer/Platforms, you will likely find folders for other platforms, such as iPhoneOS.platform and AppleTVOS.platform. Within those, Developer/SDKs leads to SDKs for those platforms.

提交回复
热议问题