在Qt中构建问题

时间:2016-06-02 13:47:40

标签: qt

我是Qt的新人。我试图在Qt 5.5.1中构建我的项目,但得到以下错误。这可能是什么原因?

错误快照:

---------------------------------------
18:56:20: Starting: "C:\Qt\Qt5.5.1\Tools\mingw492_32\bin\mingw32-make.exe" 
C:/Qt/Qt5.5.1/Tools/mingw492_32/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'D:/Perforce_Client/project/src'
g++ -c -pipe -fno-keep-inline-dllexport -Wp,-isystem,D:/Perforce_Client/target/win32/usr/include -fno-strict-aliasing -Werror -O2 -std=c++0x -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -I..\..\target\win32\usr\include -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtQuick -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtGui -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtANGLE -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtQml -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtNetwork -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtConcurrent -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore -Iobj -IC:\Qt\Qt5.5.1\5.5\mingw492_32\mkspecs\win32-g++  -o obj\myGen3.o main\myGen3.cc

In file included from C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobject.h:40:0,
                 from C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qiodevice.h:39,
                 from C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qfiledevice.h:37,
                 from C:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore/qfile.h:37,
                 from C:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore/QFile:1,
                 from main\myGen3.cc:6:
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:65: error: variable or field 'qt_static_metacall' declared void
    Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
                                                                 ^
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:65: error: 'QObject' was not declared in this scope
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:74: error: expected primary-expression before ',' token
    Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
                                                                          ^
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:76: error: incomplete type 'QMetaObject' used in nested name specifier
    Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
                                                                            ^
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:95: error: expected primary-expression before 'int'
    Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
                                                                                               ^
C:\Qt\Qt5.5.1\5.5\mingw492_32\include/QtCore/qobjectdefs.h:164:100: error: expected primary-expression before 'void'
    Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
---------------------------------------

我正在使用基于Qt 5.5.1的Qt Creator 3.5.1(企业版)(MSVC 2013,32位)。

构建和运行 - >套件配置为:桌面QT5.5.1 MinGW 32位

0 个答案:

没有答案