无法构建qt模块qtx11extras

时间:2016-07-18 07:10:35

标签: linux qt5 x11 xcb

系统配置如下, 操作系统 - RHEL 6 QT - Qt5.5.0 平台 - X86_64

我已经问了这个问题here,我根据问题的答案意识到了与此相关的问题。

实际问题是     qx11info_x11.cpp: In static member function ‘static bool QX11Info::isCompositingManagerRunning()’: **qx11info_x11.cpp:386:108: **error: ‘XInternAtom’ was not declared in this scope** if (XGetSelectionOwner(QX11Info::display(), XInternAtom(QX11Info::display(), "_NET_WM_CM_S0", false)))** ^ **qx11info_x11.cpp:386:109: error: **‘XGetSelectionOwner’ was not declared in this scope** if (XGetSelectionOwner(QX11Info::display(), XInternAtom(QX11Info::display(), "_NET_WM_CM_S0", false)))**.

实际问题在于qt模块qtx11extras,它无法识别XGetSelectionOwnerXInternAtom。但是我的Linux机箱安装了X11 / Xlib.h。即使在编译期间在包含的路径中提供Xlib.h也无济于事。所以更新了文件qtx11extras/src/x11extras/qx11info_x11.cpp以包含#include <X11/Xlib.h>,它现在成功编译。我们是否看到这种方法存在任何问题。

0 个答案:

没有答案