3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

macOSの開発環境を確認したい

Last updated at Posted at 2022-07-02

macOSのビルド環境を確認するときのコマンドのメモ。

checkEnv.sh
#!/bin/zsh checkEnv.sh
set -ex

# システム関連
sw_vers
uname -a
system_profiler SPHardwareDataType

# node関連
node --version
which node
npm --version
which npm
node-gyp --version
which node-gyp
yarn --version
which yarn

# python関連
python --version
python3 --version
which python3

# C/C++関連
clang --version
which clang
xcrun --show-sdk-path
xcrun --sdk macosx --show-sdk-path
xcodebuild -version
xcodebuild -showsdks

xcodebuild -sdk -version

MacOS SDKの変更

xcrun --show-sdk-path で表示されるSDKがデフォルトで利用される。変更するときは以下のようにSDKROOTを環境変数で定義する。SDKはここから入手したものを以下のようにSDKsフォルダに展開する。

~/.zshrc
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk"
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?