[Qt-interest] macosx: application bundle loads plugins from wrong location
Petr Vanek
petr at scribus.info
Tue Oct 26 21:25:37 CEST 2010
hi all,
I have an app which I'm trying to bundle with (cmake, BundleUtilities). It looks like everything is copied into its place. Otool -L shows that every external lib is prefixed with @executable_path including qt4 frameworks and qt4 plugins.
Qt4 is built as a "intel universal (i386;x86_64)"
When I try to run the app I'm getting famous "Class QMacSoundDelegate is implemented in both..." for all Qt4 image plugins. DYLD_PRINT_LIBRARIES=1 output:
dyld: loaded: /opt/local/libexec/qt4-mac/plugins/imageformats/libqgif.dylib
dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui
dyld: loaded: /opt/local/libexec/qt4-mac/lib/QtCore.framework/Versions/4/QtCore
dyld: loaded: /opt/local/lib/libz.1.dylib
dyld: loaded: /opt/local/lib/libpng12.0.dylib
objc[94052]: Class QCocoaColorPanelDelegate is implemented in both /Users/pvanek/oss/juffed/release-bundle/juffed.app/Contents/./MacOS/../Frameworks/QtGui.framework/Versions/4/QtGui and /opt/local/libexec/qt4-mac/lib/QtGui.framework/Versions/4/QtGui. One of the two will be used. Which one is undefined.
etc.
if I try to lookup the libqgif.dylib in the bundle, only this can be found.
rimmer:release-bundle pvanek$ find . -type f|xargs otool -L|grep libqgif
./juffed.app/Contents/plugins/imageformats/libqgif.dylib:
@executable_path/../MacOS/libqgif.dylib (compatibility version 0.0.0, current version 0.0.0)
qt.conf in the bundle contains:
[Paths]
Plugins = plugins
and pliugins are in the right location in the structure like Qt4 expects it.
what could be the reason?
all the best,
petr vanek
More information about the Qt-interest-old
mailing list