I have a dilemma. In the program that I write with Qt, I use a library (not Qt) that uses the Qt keyword in its headers as the name (the library being exact pf_ring and the name is “slots”), and therefore I get a collection of errors. But if I disable Qt keywords using the no_keywords option, the compiler complains about other library headers (based on Qt) that use Qt keywords, such as “signals” and “slots”.
So how can I fix this? I can only think of two options, none of which are satisfactory:
I can change the header files of the second library to match the no_keywords mode (changing the “slots” to “Q_SLOTS”, etc.).
I can move the pf_ring-related code into my own subproject in which I can turn off the Qt keywords or just not use Qt at all.
Can you suggest another, hopefully more elegant and less troublesome solution?
source share