I was using QT5.4.1 version with the QWT-6.1.2 library that I've installed but in compiling I receive the error "QT_STATIC_CONST does not name a type". After some researsh how to fix that, I found that I should install the QT version 5.5. I have that already achieved but the error appears although! I use Kubuntu by the way What should I do ?
Asked
Active
Viewed 4,374 times
2 Answers
2
QT_STATIC_CONST’ does not name a type. By defining QT_STATIC_CONST just before inserting Qwt file, compilation works. - In Qt5.4 , QT_STATIC_CONST was removed from qglobal.h - Qwt 6.1.1 uses this macro, but fixed it in Qwt 6.1.2

孟吴刚
- 21
- 2
0
Here is the content that was removed from qglobal.h that created this issue. Adding this to your code prior to including the header file should resolve the issue.
/*
Workaround for static const members on MSVC++.
*/
#if defined(Q_CC_MSVC)
# define QT_STATIC_CONST static
# define QT_STATIC_CONST_IMPL
#else
# define QT_STATIC_CONST static const
# define QT_STATIC_CONST_IMPL const
#endif

Aaron Swan
- 1,206
- 1
- 13
- 20