Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Deploying Qt 4.8 application on Mac OS X

$
0
0
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: 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 found Indeed 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: 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 found I adjusted it the same way. The next error is about CFNetwork.framework: 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 found CFNetwork 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: 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/QtGui This 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?

Viewing all articles
Browse latest Browse all 18427

Trending Articles