Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: expected initializer before ‘QtCoreModule’

Tags:

qt

qt-mobility

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!

like image 714
Aquarius_Girl Avatar asked May 18 '11 09:05

Aquarius_Girl


1 Answers

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
like image 120
Mat Avatar answered Oct 18 '22 22:10

Mat