Mac下QT错误,Xcode配置解决办法

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mac下QT错误,Xcode配置解决办法相关的知识,希望对你有一定的参考价值。

Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /

 

>= Xcode 8

In Xcode 8, as Bruce said, this happens when Qt tries to find xcrun when it should be looking for xcodebuild.

Step 1:

Open the file:

Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf

Step 2:

Replace:

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

With:

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

 

~> Xcode 8

Before Xcode 8, this problem occurs when command line tools are installed after Xcode is installed. What happens is the Xcode-select developer directory gets pointed to /Library/Developer/CommandLineTools.

Step 1:

Point Xcode-select to the correct Xcode Developer directory with the command:

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

Step 2:

Confirm the license agreement with the command:

xcodebuild -license

This will prompt you to read through the license agreement. 

Enter agree to accept the terms.

以上是关于Mac下QT错误,Xcode配置解决办法的主要内容,如果未能解决你的问题,请参考以下文章

Qt编译目录下exe文件执行报错问题的解决办法

Qt在Mac OS X下的编程环境搭建(配置Qt库和编译器,有图,很清楚)

系统中缺少框架,但 Mac/iOS 上的 XCode 中没有

OpenCV2.4.9 Qt5.3.1 开发环境配置错误原因与解决方案

您好,请问xcode里怎么配置opencv呢?我刚刚买了个mac,菜得很,wangda

Mac环境下执行npm install报权限错误解决办法