错误:'QtCoreModule'之前的预期初始值设定项

时间:2011-05-18 09:25:57

标签: qt qt-mobility

错误:

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文件中丢失,找不到任何内容。我应该在这里发布代码吗?或者错误意味着别的什么?

帮助!

1 个答案:

答案 0 :(得分:21)

我打赌你在导入的一个标题中的类或结构声明结尾处缺少一个;。 (具体是你的MainWindow.h。)

class Whatever : ... {

}; // <- this ";" is crucial