7

错误:

In file included from /opt/qtsdk-2010.05/qt/include/QtCore/qcoreapplication.h:47,
                 from /opt/qtsdk-2010.05/qt/include/QtGui/qapplication.h:45,
                 from /opt/qtsdk-2010.05/qt/include/QtGui/QApplication:1,
                 from main.cpp:3:
/opt/qtsdk-2010.05/qt/include/QtCore/qeventloop.h:51: error: expected initializer before ‘QtCoreModule’
make: *** [main.o] Error 1

我检查过 ; 在我的 .h 和 .cpp 文件中丢失,找不到任何文件。我应该在这里发布代码吗?或者错误意味着其他什么?

帮助!

4

1 回答 1

21

我敢打赌,您在;要导入的其中一个标头中缺少类或结构声明的末尾。(你的MainWindow.h具体。)

class Whatever : ... {

}; // <- this ";" is crucial
于 2011-05-18T09:31:41.080 回答