我在 OSX 上安装 Qt5 时遇到问题。
The Mac OSX 的 Qt 要求 http://qt-project.org/doc/qt-5.0/qtdoc/requirements-mac.html完成 - Xcode 和命令行已安装。然后我按照以下步骤操作:
# mkdir qt5
# cd qt5
# git clone git://gitorious.org/qt/qtbase.git
# cd qt5
# ./configure
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
然后我也尝试了
# cd qtbase
# ./configure -prefix $HOME/development/macosx/qt5 -nomake docs -nomake examples -nomake demos -nomake tests -opensource -confirm-license -release -no-c++11
Unknown part docs passed to -nomake.
# ./configure
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
有关相关问题的其他一些链接是:
在未安装 qt 的 Linux 上启动 qt5 应用程序时“无法加载平台插件“xcb”” https://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without
Qt5安装问题 https://stackoverflow.com/questions/14424158/qt5-installation-problems
Then Xquartz http://xquartz.macosforge.org/landing/也安装了,假设问题是因为OSX Mountain Lion上缺少X11,重新启动计算机并再次尝试安装。并没有解决一点问题。
在 Linux 上 Qt5 的安装非常顺利,没有任何麻烦。但在 OSX 上它不起作用。
我希望有人可以提出任何建议。
我自己也遇到了同样的问题,我通过在配置脚本中指定参数 -no-xcb (而不是 -qt-xcb)来解决这个问题。这使得 Qt 库的编译得以完成(尽管一些 Qt 示例程序无法编译……但这足以让我暂时回到正轨)。
我怀疑这是 Mavericks 特有的问题,因为相同的 Qt 源 tarball (qt-everywhere-enterprise-5.2.0-src.tar.gz) 在 Mountain Lion 下使用正常配置调用编译得很好。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)