start to use the QT on Mac,
And face to some compile error
1 the setting for "t Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild"
>= Xcode 8
In Xcode 8, as Bruce said, this happens when Qt tries to find xcrun when it should be looking for xcodebuild.
Open the file:
Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
Replace:
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))
With:
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
2 qt could not resolve SDK path for 'macosx10..8'I
这时由于QT for Mac中qdevice.pri文件的配置问题。我现在使用的是OS X10.10,所以需要到如下路径找到qdevice.pri文件。
Macintosh HD ▸ 用户 ▸ lining ▸ Qt5.3.2_mac ▸ 5.3 ▸ clang_64 ▸ mkspecs
然后打开该文件,默认内容如下:
!host_build:QMAKE_MAC_SDK = macosx10.8
GCC_MACHINE_DUMP =x86_64-apple-darwin12.5.0
我的电脑的系统最新显示如下“10.12.4 (16E195)
macosx10.8。改为 10.12 就好了。注意4不要写进去。
后来发现高一点的版本的QT的编译不会出现类似的问题。
后来改动5.6的版本,不要设置什么也可以编译了。