MACOS X QT部署

安装顺序:

先CLT,command Line Tools,后XCode, 最后QT Clang


如果顺序有无,参考如下解决:

https://stackoverflow.com/questions/26320677/error-could-not-resolve-sdk-path-for-macosx10-8



Error: Could not resolve SDK path for 'macosx10.8'

up vote 65 down vote accepted

The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.

There is a workaround:

  • Navigate to where you installed Qt (default /Users/your username/Qt) using finder
  • Go to the subdirectory 5.3/clang_64/mkspecs directory
  • Open the file called qdevice.pri with a text editor
  • Change the line !host_build:QMAKE_MAC_SDK = macosx10.8 to:
    • !host_build:QMAKE_MAC_SDK = macosx10.9 if you are on OS X 10.9 (Mavericks), or
    • !host_build:QMAKE_MAC_SDK = macosx if you are on OS X 10.10 (Yosemite)
  • Save the file and restart Qt Creator






down vote

I'm running Qt 5.7.1 on Mac OS 10.12.2.

None of the above answers involving adding !host_build:QMAKE_MAC_SDK = macosx10.12 to a file worked for me.

What did work was a small reconfigure on the XCode side of things as described here, the key step being entering

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

in the command line.

What caused the problem for me was that I installed the XCode command line tools before installing XCode itself which apparently makes it hard for Qt to find the Mac OS SDK.




你可能感兴趣的:(DLP,项目管理,编程杂烩)