LoginSignup
3

More than 5 years have passed since last update.

XCode8にアップデート後、Qtのライブラリを使ったプロジェクトのビルドでERRORがでるとき

Posted at

capybara-webkitのビルドで以下のエラーが発生したときの対処

$ gem install capybara-webkit -v '1.11.1'

...

Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by runningfind 
/usr/bin/xcodebuild.

環境

macOS Sierra
Ruby 2.2.5
QMake version 3.0

手順

  1. Qtのインストールしたディレクトリの配下にあるmkspecs/features/mac/default_pre.prfというファイルを開く

    findコマンドで検索できます。

    $ find / -name default_pre.prf
    ...
    /usr/local/Cellar/qt5/5.5.1_2/mkspecs/features/default_pre.prf
    /usr/local/Cellar/qt5/5.5.1_2/mkspecs/features/mac/default_pre.prf
    /usr/local/Cellar/qt5/5.5.1_2/mkspecs/features/win32/default_pre.prf
    /usr/local/Cellar/qt5/5.5.1_2/mkspecs/features/winrt/default_pre.prf
    /usr/local/Cellar/qt5/5.5.1_2/mkspecs/macx-ios-clang/features/default_pre.prf
    
  2. mkspecs/features/mac/default_pre.prfをエディタで開く

  3. 以下の行を検索して

    isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
    
  4. 以下の通り編集して保存する

    isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
    

参考ページ

https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly/7
http://stackoverflow.com/questions/39492617/xcode-8-error-project-error-xcode-not-set-up-properly-even-though-the-licens

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