Error on building project on macOS Big Sur
-
Hi everyone.
I'm trying to build and run this project on Qt Creator IDE. I am on macOS Big Sur (11.4), and I have installed XCode Command Line Tools (not the Xcode IDE). I am using Qt Creator 4.15.2 and Qt 6.1.2.When trying to run the project I get this error:
Project ERROR: Cannot run compiler '/Library/Developer/CommandLineTools/usr/bin/clang++'. Output: =================== Apple clang version 12.0.5 (clang-1205.0.22.11) Target: x86_64-apple-darwin20.5.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin clang: error: no such file or directory: 'Burato/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' ignoring nonexistent directory "/Volumes/Riccardo/usr/include/c++/v1" =================== Maybe you forgot to setup the environment?
and the code won't compile. Since I'm no professional, I don't really get what's happening nor how should I fix this.
Additionally I get also this error:
Error while parsing file /Users/Riccardo/Desktop/Qt/Manager/LightsManager/LightsManager_v2.pro. Giving up.
Thanks in advance for any help.
-
Hi,
How exactly did you install them ?
-
Well, I installed the Command Line Tools on mac via Terminal, and Qt Creator with the online installer.
If it can be of any use, this line
'Burato/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk'
refers to the Xcode app on a Volume which has the complete name of 'Riccardo Burato' (it is an external hard disk).
Before installing the Command Line Tools, I used
xcode-select -s
to set the source of the command line tools to an Xcode app that I had on that volume 'Riccardo Burato'.
-
You are talking in the past tense, did you remove some stuff ?
Changed things with regards to Xcode ? -
Your command line installation is configured to use it hence the error you are seeing.
-
No, it is not and I'll tell you why.
If I run
xcode-select -p
I get
/Library/Developer/CommandLineTools
And if run a .c file to compile with clang I get no errors. It must be something inside Qt Creator.
Additionally, I created a new user account on my mac, and Qt builds and runs everything without a problem! Are there any settings in Qt I should check?
-
I forgot about that one !
It has also bitten me on several occasions.
Glad you found out and thanks for sharing :-)