• 370阅读
  • 0回复

[讨论]QT6.5.4突然莫名其妙报错,而且全是qt自带头文件报错 [复制链接]

上一主题 下一主题
离线wheatmind
 

只看楼主 倒序阅读 楼主  发表于: 01-10


这里怎么不能上传图片啊?


main.cpp
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qhashfunctions.h(24): warning C4005: 'UINT32_C': macro redefinition
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\stdint.h(130): note: see previous definition of 'UINT32_C'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdatastream.h(177): error C2143: syntax error: missing ';' before '<'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdatastream.h(177): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdatastream.h(177): error C2238: unexpected token(s) preceding ';'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qtextstream.h(161): error C2143: syntax error: missing ';' before '<'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qtextstream.h(161): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qtextstream.h(161): error C2238: unexpected token(s) preceding ';'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qtextstream.h(27): error C2065: 'd_ptr': undeclared identifier
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdebug.h(212): error C2143: syntax error: missing ';' before '<'
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdebug.h(212): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Qt\6.5.2\msvc2019_64\include\QtCore/qdebug.h(212): error C2238: unexpected token(s) preceding ';'
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(29): error C2504: 'QObject': base class undefined
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(206): error C3668: 'QAction::event': method with override specifier 'override' did not override any base class methods
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(90): error C3861: 'parent': identifier not found
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(90): note: 'parent': function declaration must be available as none of the arguments depend on a template parameter
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(88): note: This diagnostic occurred in the compiler generated function 'T QAction::parentWidget(void) const'
C:\Qt\6.5.2\msvc2019_64\include\QtGui/qaction.h(32): error C2065: 'd_ptr': undeclared identifier
C:\Qt\6.5.2\msvc2019_64\include\QtGui\qactiongroup.h(16): error C2504: 'QObject': base class undefined
C:\Qt\6.5.2\msvc2019_64\include\QtGui\qactiongroup.h(19): error C2065: 'd_ptr': undeclared identifier

不论打开哪个工程都爆这个错误。真是日了狗了。   图片见csdn链接。


https://blog.csdn.net/durongze/article/details/145065771?spm=1001.2014.3001.5502
快速回复
限100 字节
 
上一个 下一个