0

My project is using both Qt (included Qwt) and Boost::signals. As known, their macros are incompatible with each other. I compiled my project with CONFIG += no_keywords and renamed all Qt macros with upper-case registry i.e. signals = Q_SIGNALS. There are no more errors in project, but now I have errors in Qwt includes like this

/usr/include/qwtplot3d/qwt3d_extglwidget.h:101:1: error: ‘signals’ does not name a type
/usr/include/qwtplot3d/qwt3d_extglwidget.h:116:8: error: expected ‘:’ before ‘slots’
/usr/include/qwtplot3d/qwt3d_extglwidget.h:116:8: error: ‘slots’ does not name a type

It seems that Qwt is still conflicting with Boost::signals. What can I do here?

Bart
  • 19,692
  • 7
  • 68
  • 77

1 Answers1

1

Qwt is compatible with boost signals - you are talking about a lib called QwtPlot3D !

When you want to use boost signals with QwtPlot3D you have to patch its implementation replacing the signal/slot/emit macros like you did it with your code.

Uwe
  • 705
  • 3
  • 3
  • I know about this variant, but trying to find another decision. Right now, i am trying to do things like this: #undef QT_NO_KEYWORDS #include #define QT_NO_KEYWORDS no_keywords And compiling project with CONFIG += no_keywords – SandyEmerald Nov 27 '12 at 13:24
  • btw, not only qwtplot3d but also other parts of qwt i.e.: /usr/include/qwt/qwt_picker.h:290:1: error: ‘signals’ does not name a type – SandyEmerald Nov 27 '12 at 13:35
  • Previous suggestion did not help. – SandyEmerald Nov 27 '12 at 14:08
  • The offending line in qwt_picker.h is from Qwt 5.2 what is very outdated. More recent versions of Qwt don't use the conflicting keywords anymore. But when you have a look in the admin directory of Qwt 5.2 you find a script that does the renaming you need ( on systems where you have sed available ). You could adopt it for the QwtPlot3D files. – Uwe Nov 27 '12 at 15:19
  • Well, ok i will try this, but right now im using rpmbuild and mock to rebuild qwt. I changed all macros using sed. Lets see what happens. – SandyEmerald Nov 27 '12 at 15:25