络腮胡菲菲 发表于 2024-6-24 05:52:52

qt 与 x11 头文件同时引用,出现重定义的问题

一、问题描述

qt 与 x11 头文件同时引用,出现重定义的问题:expected identifier before numeric constant
二、办理问题

#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
在引用的 头文件 中加入 下面的 取消定义即可
#undef Bool
#undef CursorShape
#undef Expose
#undef KeyPress
#undef KeyRelease
#undef FocusIn
#undef FocusOut
#undef FontChange
#undef None
#undef Status
#undef Unsorted

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: qt 与 x11 头文件同时引用,出现重定义的问题