开发者

error: expected initializer before ‘QtCoreModule’

开发者 https://www.devze.com 2023-03-07 03:41 出处:网络
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,

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

精彩评论

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

关注公众号