'QT_STATIC_CONST does not name a type

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 ?



Solution 1:[1]

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

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ???
Solution 2 Aaron Swan