Hi all,

I'v been struggling for days with this issue.

When ever I use "qpixelformat.h" header in my code, I get a bunch of error.
I am using QT : 5.12.3 which was installed from homebrew.
OS : Mac High Sierra 10.13.6
Any advices? Please help.

this is my error code :

/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:95:26: error: expected ')'
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:95:25: note: to match this '('
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:95:51: error: expected ')'
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:95:20: note: to match this '('
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:95:5: error: C++ requires a type specifier
for all declarations
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == uint(TotalFieldWidthByOffsets));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:96:26: error: expected ')'
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == 8 * sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:96:25: note: to match this '('
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == 8 * sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:96:51: error: expected ')'
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == 8 * sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:96:20: note: to match this '('
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == 8 * sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:96:5: error: C++ requires a type specifier
for all declarations
Q_STATIC_ASSERT(uint(TotalFieldWidthByWidths) == 8 * sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:98:76: error: expected ';' at end of
declaration list
Q_DECL_CONSTEXPR inline uchar get(Field offset, FieldWidth width) const Q_DECL_NOTHROW
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:163:43: error: expected ';' at end of
declaration list
Q_DECL_CONSTEXPR inline QPixelFormat() Q_DECL_NOTHROW : data(0) {}
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:178:29: error: unknown type name
'ColorModel'
Q_DECL_CONSTEXPR inline ColorModel colorModel() const Q_DECL_NOTHROW { return ColorModel(get...
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:178:58: error: expected ';' at end of
declaration list
Q_DECL_CONSTEXPR inline ColorModel colorModel() const Q_DECL_NOTHROW { return ColorModel(get...
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:225:12: error: unknown type name
'Q_DECL_CONST_FUNCTION'
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(QPixelFormat fmt1, QPixe...
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:225:34: error: expected member name or ';'
after declaration specifiers
friend Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline bool operator==(QPixelFormat fmt1, QPixe...

/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:231:1: error: C++ requires a type specifier
for all declarations
Q_STATIC_ASSERT(sizeof(QPixelFormat) == sizeof(quint64));
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:236:68: error: 'YUVLayout' is a private
member of 'QPixelFormat'
QPixelFormat Q_GUI_EXPORT QPixelFormat_createYUV(QPixelFormat::YUVLayout yuvLayout,
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:138:10: note: implicitly declared private
here
enum YUVLayout {
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:238:68: error: 'AlphaUsage' is a private
member of 'QPixelFormat'
QPixelFormat::AlphaUsage alphaUsage,
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:116:10: note: implicitly declared private
here
enum AlphaUsage {
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:239:68: error: 'AlphaPosition' is a private
member of 'QPixelFormat'
QPixelFormat::AlphaPosition alphaPosition,
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:121:10: note: implicitly declared private
here
enum AlphaPosition {
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:240:68: error: 'AlphaPremultiplied' is a
private member of 'QPixelFormat'
QPixelFormat::AlphaPremultiplied premultiplied,
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:126:10: note: implicitly declared private
here
enum AlphaPremultiplied {
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:241:68: error: 'TypeInterpretation' is a
private member of 'QPixelFormat'
QPixelFormat::TypeInterpretation typeInterpretation,
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:131:10: note: implicitly declared private
here
enum TypeInterpretation {
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:242:68: error: 'ByteOrder' is a private
member of 'QPixelFormat'
QPixelFormat::ByteOrder byteOrder);
^
/usr/local/opt/qt/lib/QtGui.framework/Headers/qpixelformat.h:157:10: note: implicitly declared private
here
enum ByteOrder {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]