问题
After a successful install of mac OS 10.7 I tried to compile my qt 4.7 project.
I had many warnings of "unsupported mac os x version". I thus decided to use Qt 4.8 beta and now, all the warnings are gone.
However, I now have a linker problem using Phonon:
dyld: Library not loaded:/Users/pulseagent/repos/build2/Desktop/Qt/4.8.0/gcc/lib/QtDBus.framework/Versions/4/QtDBus
Referenced from: /Users/kikohs/QtSDK/Desktop/Qt/4.8.0/gcc/lib/phonon.framework/Versions/Current/phonon
Reason: Incompatible library version: phonon requires version 4.8.0 or later, but QtDBus provides version 4.7.0
Do you know I could I fix this ?
Thanks!
回答1:
You could easily install QT under Lion using homebrew(which already has a fix for this):
install homebrew using
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
install qt using
brew install qt --build-from-source
回答2:
For now I decided to stick with Qt 4.7.3, to remove the warnings I hacked the qtglobal.h and added Mac 10.7 as a supported version.
It seems to run fine ...
回答3:
I would recommend using MacPorts. If you download the MacPorts installer 2.0.0 (latest at the time of writing) you can unpack the qt4-mac-devel-4.8.0-beta1.tgz file posted at the end of this MacPorts trac report over the qt4-mac-devel port, in order to get 4.8.0 beta 1 working under Lion.
It's not official yet, but then nor is Qt 4.8.0. It seems to work well and can be used to build Qt Creator 2.2.1 without problems.
回答4:
I'm using Qt Creator 2.2.1 and Qt 4.7.4 (64 bit).
While a build in Lion reported a number of warnings (to do with the Mac OS version) the resulting app did work as expected.
Using the macdeployqt tool ( QtSDK/Desktop/Qt/473/gcc/bin/macdeployqt ), with the -dmg switch, creates a dmg file from the app with all of the required dependencies.
And while this reported a number of errors (to do with copying nib files) the resulting dmg file still worked as expected.
来源:https://stackoverflow.com/questions/6794005/qt-4-8-beta-and-mac-osx-lion-phonon-error