QT【002】- mac QT Mac compile problem

 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的版本,不要设置什么也可以编译了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Franklin

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值