Error: Could not resolve SDK path for 'macosx10.8'
The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.
There is a workaround:
- Navigate to where you installed Qt (default /Users/your username/Qt) using finder
- Go to the subdirectory 5.3/clang_64/mkspecs directory
- Open the file called qdevice.pri with a text editor
- Change the line
!host_build:QMAKE_MAC_SDK = macosx10.8
to:!host_build:QMAKE_MAC_SDK = macosx10.9
if you are on OS X 10.9 (Mavericks), or!host_build:QMAKE_MAC_SDK = macosx
if you are on OS X 10.10 (Yosemite)
- Save the file and restart Qt Creator
qt 5.7 + Xcode 8.1 + os x El Capitan - could not resolve SDK Path for 'macosx'
Seems like I found the reason of getting errors. In my Xcode's -> Preferences -> Locations -> Command Line Tools
there was no SDK selected. I have selected Xcode 8.1 and it seems to work ok now. Hope it won't be other problems.
Could not resolve SDK path for 'macosx10.10'
I think I found a solution from https://stackoverflow.com/questions/26320677/error-could-not-resolve-sdk-path-for-macosx10-8`.
I changed it to QMAKE_MAC_SDK = macosx10.11
and it works. But I don't know why here should be 10.11, as I'm using OS X 10.10.5. I just guess that the Xcode updated yesterday is used for new version of Mac OS called OS X el capitan.
Qt5 on OSX 10.6
Can I change sdk version to macosx10.6 at *.pro file or something?
This one
QMAKE_MAC_SDK = macosx10.6
works well.
Error deploying Qt application on OS X
I have uninstalled other qt versions using brew list
, brew remove qt
and brew remove qt5
. I also noted that I had pyqt installed (and I was not using it), so I also remove it using brew remove pyqt
.
Then, I have reinstalled Qt 5.3.2 and had other issues:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
Which was solved changing the isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))
command from the Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
file to isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))
, as explained here: Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild
and
Could not resolve SDK path for 'macosx10.8'
That was solved by changing the QtPath/5.3/clang_64/mkspecs/qdevice.pri
from !host_build:QMAKE_MAC_SDK = macosx10.8
to !host_build:QMAKE_MAC_SDK = macosx10.12
, as explained here: Error: Could not resolve SDK path for 'macosx10.8'
So, I run the command from my Qt directory:
/Users/kuser/Qt5.3.2/5.3/clang_64/bin/macdeployqt MyApplication.app -dmg
and it worked.
I found these solutions in comments from the following question:
Qt5 cannot find platform plugins Mac OS X
Note: this does not solve the macdeployqt
error directly, but as it is part of the Qt installation, reinstalling it solved my problem.
VLC compile on mac can't find MacOSX.sdk
cf: ../extras/package/macosx/build.sh -h
It says:
usage: extras/package/macosx/build.sh [options]
Build vlc in the current directory
OPTIONS:
-h Show some help
-q Be quiet
-j Force number of cores to be used
-r Rebuild everything (tools, contribs, vlc)
-c Recompile contribs from sources
-p Build packages for all artifacts
-i <n|u> Create an installable package (n: nightly, u: unsigned stripped release archive)
-k <sdk> Use the specified sdk (default: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk)
-a <arch> Use the specified arch (default: x86_64)
-C Use the specified VLC build dir
-b <url> Enable breakpad support and send crash reports to this URL
-d Disable debug mode (on by default)
Your build command should also include the location of your SDK using the -k
option:
../extras/package/macosx/build.sh -c -k /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
The script uses xcrun --show-sdk-path
to set the SDK otherwise. xcrun
uses the environment variable $SDKROOT.
Note: You might want to install and use the versioned SDK, for example in your question the output shows that it is targeting minimum El Capitan, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
The versioned SDKs are available in old Xcodes, and on github.
Setting up the "contrib environment" is all handled by the "single command".
Related Topics
Why Do We Need to Use 'Int Main' and Not 'Void Main' in C++
Dynamically Allocated Memory After Program Termination
Prefix/Postfix Increment Operators
How to Access Private Data Members Outside the Class Without Making "Friend"S
How to Automatically Register a Class on Creation
Std::Unique_Ptr for C Functions That Need Free
Multiple Definition Error Including C++ Header File with Inline Code from Multiple Sources
The Intersection of Two Sorted Arrays
Difference in Behavior While Using Dynamic_Cast with Reference and Pointers
Should a Move Constructor Take a Const or Non-Const Rvalue Reference
How to Use an Array as Map Value
C++: When (And How) Are C++ Global Static Constructors Called
Populate an Array Using Constexpr at Compile-Time
How to Read Groups of Integers from a File, Line by Line in C++