Resolving platform SDK Warning on macOS
-
I am getting the following warnings:
Project WARNING: Qt has only been tested with version 10.15 of the platform SDK, you're using 11.0. Project WARNING: This is an unsupported configuration. You may experience build issues, and by using Project WARNING: the 11.0 SDK you are opting in to new features that Qt has not been prepared for. Project WARNING: Please downgrade the SDK you use to build your app to version 10.15, or configure Project WARNING: with CONFIG+=sdk_no_version_check when running qmake to silence this warning.
I am not sure how to resolve this problem.
I am using:
Qt Creator 4.13.2 Based on Qt 5.15.1 (Clang 11.0 (Apple), 64 bit) Built on Oct 1 2020 01:16:45
I have Xcode Version 12.2 (12B45b) installed.
$ xcodebuild -showsdks iOS SDKs: iOS 14.2 -sdk iphoneos14.2 iOS Simulator SDKs: Simulator - iOS 14.2 -sdk iphonesimulator14.2 macOS SDKs: DriverKit 20.0 -sdk driverkit.macosx20.0 macOS 11.0 -sdk macosx11.0 tvOS SDKs: tvOS 14.2 -sdk appletvos14.2 tvOS Simulator SDKs: Simulator - tvOS 14.2 -sdk appletvsimulator14.2 watchOS SDKs: watchOS 7.1 -sdk watchos7.1 watchOS Simulator SDKs: Simulator - watchOS 7.1 -sdk watchsimulator7.1
I assume the warning is based on finding: macOS 11.0 -sdk macosx11.0
When I ran the Qt installer, I selected the Qt version 5.12.10 of the components.
If more information is required, please let me know.
Suggestions?
-
I downloaded Xcode 11.7 and executed
sudo xcode-select -s /Applications/Xcode_11_7.app/Contents/Developer
xcodebuild -showsdks then shows macOS 10.15 -sdk macosx10.15.
However, Qt Creator does not honor what is selected with xcode-select.
The solution appears to be:
-
go to Projects -> Build & Run -> Desktop Qt 5.12.10 clang 64.bit -> Build.
-
go to the Build Environment section and edit the PATH.
The path will contain
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I changed it to:
/Applications/Xcode_11_7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
which is the location where I installed Xcode 11.7.
The warnings have disappeared.
If there is a better solution or something I have missed, I would be interested.
If someone can confirm this is the correct solution, that would be appreciated.
-
-
There are complete instructions for downloading, finding and installing older SDKs in newer XCode versions in this answer on Stack Overflow:
https://stackoverflow.com/questions/65952224/qtcreator-fails-on-macos-sdk-11-1/66497078#66497078