Qt 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")))
~> 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
.
Point Xcode-select
to the correct Xcode Developer directory with the command:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Confirm the license agreement with the command:
sudo xcodebuild -license
This will prompt you to read through the license agreement.
Enter agree
to accept the terms.
XCode 8 error Project ERROR: Xcode not set up properly, even though the license has been accepted
I managed to get capybara-webkit (which uses QT) built with XCode 8 / MacOX Sierra after following these instructions (found here: https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly/7)
- Move to the folder where you install Qt.
- Open in a text editor the file at Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
Find the line with text (for me it was line 15):
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))): \
Replace line with:
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
Save & re-compile
Qt does not work since Xcode 8
For the moment, untill Qt updates this is a fix:
Step 1:
Open the file:
<Qt installation 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")))
QT Creator and OpenCV455: 'arm_neon.h' file not found
Okay, I found a solution after three days of re-installing and re-compiling everything in every possible configuration (like opencv with unix makefiles, xcode, forced target architecture of arm64 etc). What finally worked was to disable the ClangCodeModel
flag in the plugin section of QtCreator (Menu: About/Plugins/ -> search for ClangCodeModel
, disable the plugin and restart the application.
I'm pretty sure this is just a workaround, but at least I can work now as it should be and maybe this helps someone else. If anyone has some input on how to fix this issue at its core, any help or alternative answer is very appreciated.
Related Topics
Undefined Reference to Template Function
Converting Data from Glreadpixels() to Opencv::Mat
Are There Any Tricks to Use Std::Cin to Initialize a Const Variable
C++ Multiple Inheritance Function Call Ambiguity
How to Access Private Data Members Outside the Class Without Making "Friend"S
How to Append Text to Qplaintextedit Without Adding Newline, and Keep Scroll at the Bottom
How to Release Pointer from Boost::Shared_Ptr
How to Read and Write a Stl C++ String
Get Index of a Tuple Element's Type
How to Convert a Char Array to a String
Fatal Error Lnk1104: Cannot Open File 'Libboost_System-Vc110-Mt-Gd-1_51.Lib'
How to Alpha Blend Rgba Unsigned Byte Color Fast
How to Convert Unsigned Char* to Std::String in C++
Do C++ Templates Make Programs Slow