当前位置: 代码迷 >> QT开发 >> 请教大神们,为什么小弟我原程序能在QT Cteator生成可执行文件的,现在换了qte的qmake环境就出错了!
  详细解决方案

请教大神们,为什么小弟我原程序能在QT Cteator生成可执行文件的,现在换了qte的qmake环境就出错了!

热度:178   发布时间:2016-04-25 05:03:31.0
请问大神们,为什么我原程序能在QT Cteator生成可执行文件的,现在换了qte的qmake环境就出错了!!!
我用Qt Creator自带的qmake环境构建,工程文件能无错生成可执行文件。是x86版本的。

现在我想生成 ARM 版本的可执行文件放到开发板上运行。装了Qte4.4.3后,改了下qt版本,构建出错输出如下:

14:02:06: 为项目lincom执行构建步骤 ...
14:02:06: 配置没有改变, 跳过 qmake 步骤.
14:02:06: 正在启动 "/usr/bin/make" -w
 {1"?} {2?}
make: Entering directory `/home/lrr/lrr/lincom'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/bin/qmake -unix -o Makefile lincom.pro
make: Leaving directory `/home/lrr/lrr/lincom'
make: Entering directory `/home/lrr/lrr/lincom'
arm-linux-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/mkspecs/qws/linux-arm-g++ -I. -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtCore -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtCore -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtNetwork -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtNetwork -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui -I/tmp/4.4.3/builddir/sdk/qtopiacore/target/include -I. -I. -o mainwindow.o mainwindow.cpp
In file included from mainwindow.cpp:2:
ui_mainwindow.h: In member function 'void Ui_MainWindow::setupUi(QMainWindow*)':
ui_mainwindow.h:110: error: 'class QMainWindow' has no member named 'setCursor'
ui_mainwindow.h:110: error: no matching function for call to 'QCursor::QCursor(Qt::CursorShape)'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qcursor.h:64: note: candidates are: QCursor::QCursor()
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qcursor.h:58: note: QCursor::QCursor(const QCursor&)
ui_mainwindow.h:131: error: 'class QMainWindow' has no member named 'setAnimated'
ui_mainwindow.h:441: error: 'class QToolBar' has no member named 'setCursor'
ui_mainwindow.h:441: error: no matching function for call to 'QCursor::QCursor(Qt::CursorShape)'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qcursor.h:64: note: candidates are: QCursor::QCursor()
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qcursor.h:58: note: QCursor::QCursor(const QCursor&)
ui_mainwindow.h:450: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
ui_mainwindow.h:451: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
ui_mainwindow.h:452: error: 'class QMainWindow' has no member named 'setStatusBar'
mainwindow.cpp: In constructor 'MainWindow::MainWindow(QWidget*)':
mainwindow.cpp:15: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
mainwindow.cpp: In member function 'void MainWindow::on_actionOpen_triggered()':
mainwindow.cpp:125: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
mainwindow.cpp: In member function 'void MainWindow::on_actionClose_triggered()':
mainwindow.cpp:149: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
mainwindow.cpp: In member function 'void MainWindow::on_actionAbout_triggered()':
mainwindow.cpp:156: error: invalid use of incomplete type 'struct QStatusBar'
/tmp/4.4.3/builddir/sdk/qtopiacore/target/include/QtGui/qmainwindow.h:54: error: forward declaration of 'struct QStatusBar'
mainwindow.cpp: In member function 'void MainWindow::readMyCom()':
mainwindow.cpp:192: error: invalid use of incomplete type 'struct QStatusBar'