

You should not need to change this default, but if needed you can increase it in your project file: Qt expresses the deployment target via the QMAKE_MACOSX_DEPLOYMENT_TARGET qmake variable, which has a default value set via the makespec for macOS. If the binary is launched on a macOS version below the deployment target macOS or Qt will give an error message and the application will not run. In theory this would allow running your application on every single macOS version released, but for practical (and technical) reasons there is a lower limit to this range, known as the deployment target of your application. When the binary is run on a macOS version lower than the SDK it was built with, Qt will check at runtime whether or not a platform feature is available before utilizing it. 14.sdk Target Platformsīuilding for macOS utilizes a technique called weak linking that allows you to build your application against the headers and libraries of the latest platform SDK, while still allowing your application to be deployed to macOS versions lower than the SDK version. app /Contents /Developer /Platforms /MacOSX. But changing this manually is cumbersome and error-prone, be sure to create a script for that if you are doing this constantly./Applications /Xcode. In this way we can selectively use debug libraries for this program without affecting the system library. tst_qfontmetrics.app/Contents/MacOS/tst_qfontmetrics $ install_name_tool -change /Users/username/qt/lib/amework/Versions/4/QtCore /Users/username/qt/lib/amework/Versions/4/QtCore_debug. $ install_name_tool -change /Users/username/qt/lib/amework/Versions/4/QtGui /Users/username/qt/lib/amework/Versions/4/QtGui_debug. $ install_name_tool -change /Users/username/qt/lib/amework/Versions/4/QtTest /Users/username/qt/lib/amework/Versions/4/QtTest_debug. We need to change the paths of QtTest, QtGui and QtCore here, which means: usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0) usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) Users/username/qt/lib/amework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.0) Users/username/qt/lib/amework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.0) System/Library/Frameworks/amework/Versions/A/Security (compatibility version 1.0.0, current version 37594.0.0) System/Library/Frameworks/amework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0) System/Library/Frameworks/amework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0) Users/username/qt/lib/amework/Versions/4/QtTest (compatibility version 4.8.0, current version 4.8.0) Tst_qfontmetrics.app/Contents/MacOS/tst_qfontmetrics: $ otool -L tst_qfontmetrics.app/Contents/MacOS/tst_qfontmetrics First of all, we can see a Qt program will link to several libraries and frameworks:
#Qt mac os version install#
$ sudo cp /usr/lib/libSystem.B.dylib /usr/lib/libSystem.B_debug.dylib // optionalĪnother solution is to change the install name information in the executable directly with install_name_tool (an utility shipped with Xcode). $ sudo mv /usr/lib/libSystem.B_debug.dylib /usr/lib/libSystem.B_

To be able to use Qt in debug mode, you must remove the debug version of the library (or overwrite it with the release version).

The reason is that Apple system frameworks crash when using the debug libraries. Unfortunately, on Snow Leopard, this causes your application to crash. This is done by setting the DYLD_IMAGE_SUFFIX environment variable to _debug. When using Qt frameworks, you might want to use the debug libraries instead of the release ones.
