Deploying Qt 4.8 application on Mac OS X
-
Hello. I am developing a Mac OS X application that I would like to run on OSX 10.6 and higher. The development platform is Mac OS X 10.8 + XCode 4.5.2 + Qt 4.8.4. I set XCode deployment target to 10.6, also I am using macdeployqt tool to include the required libraries into the bundle. It works fine on a clean Mac OS X 10.8, but when I try to launch it on OSX 10.7 or 10.6 it fails with the following error:
bq.
Dyld Error Message:
Library not loaded: /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
Referenced from: /Users/USER/Desktop/MyApp.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
Reason: image not foundIndeed location of CoreText.framework is different on Mac OS X 10.8 and 10.6, 10.7. However, OSX 10.8 still has a link at the old place, so I decided to use it. When I manually adjust the path, I get another error:
bq. Library not loaded: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
Referenced from: /Users/USER/Desktop/MyApp.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
Reason: image not foundI adjusted it the same way. The next error is about CFNetwork.framework:
bq. Library not loaded: /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
Referenced from: /Users/USER/Desktop/MyApp.app/Contents/MacOS/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork
Reason: image not foundCFNetwork is in a different place on OSX 10.8 and there is no compatibility link to the previous location, so I ended up with copying this framework into the bundle. The next error is about some missing symbol:
bq. Symbol not found: OBJC_CLASS$_NSObject
Referenced from: /Users/USER/Desktop/MyApp.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui
Expected in: /usr/lib/libobjc.A.dylib
in /Users/USER/Desktop/MyApp.app/Contents/MacOS/../Frameworks/QtGui.framework/Versions/4/QtGuiThis one I don't know how to fix. I tried copying the latest library into the bundle, but it leads to more and more similar errors in dependent libraries.
I believe there must be a better way of deploying Qt application on Mac. Could somebody explain how this was meant to be done?
-
Hi,
Are you using a Qt version that's also targeting 10.6 ?
-
I am using Qt libraries 4.8.4 for Mac (185 MB) downloaded from "here":http://qt-project.org/downloads, they don't tell what is the target.