Saturday, 23 July 2011

Some errors while adding payment.cpp


In file included from /home/puneet/puneet/office/alkimia/qtcreator-build/backend/paymentbackend_automoc.cpp:11:
/home/puneet/puneet/office/alkimia/qtcreator-build/backend/moc_payment.cpp:20: error: expected initializer before ‘qt_meta_data_payment’
/home/puneet/puneet/office/alkimia/qtcreator-build/backend/moc_payment.cpp:42: error: ‘qt_meta_data_payment’ was not declared in this scope
/home/puneet/puneet/office/alkimia/qtcreator-build/backend/moc_payment.cpp:43: error: too many initializers for ‘QMetaObject::<anonymous struct>’
make[2]: *** [backend/CMakeFiles/paymentbackend.dir/paymentbackend_automoc.o] Error 1
make[2]: Leaving directory `/home/puneet/puneet/office/alkimia/qtcreator-build'
make[1]: *** [backend/CMakeFiles/paymentbackend.dir/all] Error 2
make[1]: Leaving directory `/home/puneet/puneet/office/alkimia/qtcreator-build'
make: *** [all] Error 2
The process "/usr/bin/make" exited with code %2.
Error while building project alkimiapayment (target: Desktop)
When executing build step 'Make'



Errors like this are usually caused by an error in any of the header files processed before the qt include file.

In my case i had missed ';' in the class declaration

No comments:

Post a Comment