Qt SDK 1.1 Beta - Qt 4.7.2 - Problem with macdeployqt
-
What exactly do you get when running your application?
-
Something like this:
... mores objc[1753]: ...
objc[1753]: Class QNSMenu is implemented in both /Volumes/Macintosh/DMMD/PODIUM/main/bin/release/Podium.app/Contents/MacOS/./../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/cincirin/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[1753]: Class QNSStatusItem is implemented in both /Volumes/Macintosh/DMMD/PODIUM/main/bin/release/Podium.app/Contents/MacOS/./../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/cincirin/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
objc[1753]: Class QNSImageView is implemented in both /Volumes/Macintosh/DMMD/PODIUM/main/bin/release/Podium.app/Contents/MacOS/./../Frameworks/QtGui.framework/Versions/4/QtGui and /Users/cincirin/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
QWidget: Must construct a QApplication before a QPaintDeviceIn fact is the same error mentioned in "this bug report":https://bugreports.qt-project.org/browse/QTSDK-731?focusedCommentId=162781&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-162781
-
Ok, this is a typical case of conflicts between system and embedded Qt libraries. This is easy to fix. You just need to be meticulous. What does:
bq. otool -L YOURAPP.app/Contents/MacOS/YOURAPP
give you? The problem is bound to be there or in one of the Qt libraries/plugins embedded in your application bundle, in which case you might also want to check all the libraries located under YOURAPP.app/Contents/Frameworks, as well as all the plugins located under YOUAPP.app/Contents/PlugIns.
-
[quote author="DocOx" date="1342090995"]What does:
bq. otool -L YOURAPP.app/Contents/MacOS/YOURAPP
give you? [/quote]@
@executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.1)
@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.1)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
@ -
It would have been nice if you had used the quotes or code tag to format the output. Anyway, I can't see anything wrong with the above.
It might be worth checking your embedded copy of the Qt libraries and plugins. Looking at your previous message again, the issue is with QtGui, so there must be something in your application bundle which doesn't refer to your embedded copy of QtGui.
-
[quote author="DocOx" date="1342094734"]It would have been nice if you had used the quotes or code tag to format the output. [/quote]
Fixed :-) (sorry)
Thanks for your suggestions, I just follow all steps from above, so I tried three ways:
a) QTDIR/bin/ macdeployqt
b) "Mac OS X Deployment Script":http://www.qtcentre.org/wiki/index.php?title=Mac_OS_X_Deployment_Script
c) manually all steps from "Linking the Application to Qt as Frameworks":http://doc.qt.nokia.com/4.7-snapshot/deployment-mac.html#linking-the-application-to-qt-as-frameworksIn all ways, the same result.
I must admit that, usually, I'm not a mac developer, so just tried all possibilities :-) I don't know if is really a "bug":https://bugreports.qt-project.org/browse/QTSDK-731?focusedCommentId=162781&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-162781 the same as those already mentioned. -
Have you tried otool -L on your embedded copy of the Qt libraries and plugins? For me, the problem is bound to be there somewhere...
-
[quote author="DocOx" date="1342096224"]Have you tried otool -L on your embedded copy of the Qt libraries and plugins? [/quote]
Maybe you are right ... I'll try and let you know.
-
ok here we are:
otool -L QtGui
@
QtGui:
@executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui (compatibility version 4.8.0, current version 4.8.1)
@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.1)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.0.0)
@otool -L QtCore
@
QtCore:
@executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore (compatibility version 4.8.0, current version 4.8.1)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 36910.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
@So ... all seems to have correct dependencies.
-
Ok, my fault :-) Stupid of me ...
So I developed a plugin that application dynamically load it. I did not apply mentioned scripts for this plug-in, but only for main application.
Now all is working better ...
Thanks.