错误:预期在“QtCoreModule”之前初始化程序
错误:
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 文件中丢失,找不到任何文件。我应该在这里发布代码吗?或者错误意味着其他什么?
帮助!
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 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我敢打赌,您正在导入的标头之一的类或结构声明末尾缺少
;
。 (特别是您的MainWindow.h
。)I'm betting you're missing an
;
at the end of a class or struct declaration in one of the headers you're importing. (YourMainWindow.h
specifically.)