Qt macro keywords cause name collisions
问题 I am building an NCurses interface for my Qt project. I want to use CDK but I think the signals member of this struct is colliding with the Qt signals keyword. /usr/include/linux/cdk.h:411: error: expected unqualified-id before 'protected' How can I get CDK to work with Qt? 回答1: You can define the QT_NO_KEYWORDS macro, that disables the “signals” and “slots” macros. If you use QMake: CONFIG += no_keywords (Qt Documentation here) If you’re using another build system, do whatever it needs to