zl程序教程

您现在的位置是:首页 >  工具

当前栏目

qt 与 x11 头文件同时引用

Qt 引用 同时 头文件 X11
2023-09-14 09:08:25 时间

With the following includes:

#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

I needed to undef a few definitions:

#undef Bool
#undef CursorShape
#undef Expose
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef None
#undef Status
#undef Unsorted

Of course add LIBS += -lX11 in your .pro file, and you are good to go!