Qt5在OSX -qt-xcb上安装

Thr*_*ash 7 c++ x11 macos qt xcb

我在OSX上安装Qt5时遇到了问题.

完成Mac OSXQt要求 - 安装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.
Run Code Online (Sandbox Code Playgroud)

然后我也试过了

 # 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.
Run Code Online (Sandbox Code Playgroud)

关于相关问题的其他一些链接是:

然后还安装了Xquartz,假设问题是因为OSX Mountain Lion上缺少X11,重新启动计算机并再次尝试安装.它没有解决这个问题.

在Linux Qt5安装很好,没有喧嚣.但是在OSX上它不起作用.

我希望有人可以提出任何建议.

Jer*_*ner 7

我自己也遇到了同样的问题,我通过在configure脚本中指定参数-no-xcb(而不是-qt-xcb)来解决这个问题.这样就可以完成Qt库的编译(虽然有些Qt示例程序无法编译......但这足以让我现在回到正轨).

我怀疑这是一个特定于Mavericks的问题,因为同样的Qt源代码tarball(qt-everywhere-enterprise-5.2.0-src.tar.gz)在Mountain Lion下正常配置调用时编译得很好.


小智 6

这与小牛队无关.您的PATH中有MacPorts或类似的东西.configure脚本检测X-Windows,因此尝试配置xcb后端.

在编译之前将PATH重置为最小值:

export PATH =/usr/bin:/ bin:/ usr/sbin:/ sbin

这将解决问题.