开发者

error: expected initializer before ‘QtCoreModule’

Errors:

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开发者_JAVA百科 main.cpp:3:
/opt/qtsdk-2010.05/qt/include/QtCore/qeventloop.h:51: error: expected initializer before ‘QtCoreModule’
make: *** [main.o] Error 1

I have checked ; missing in my .h and .cpp files, couldn't find any. Should I post here the code? Or the error means something else?

Help!


I'm betting you're missing an ; at the end of a class or struct declaration in one of the headers you're importing. (Your MainWindow.h specifically.)

class Whatever : ... {

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜