When I try running a Qt application with the following main.cpp file:
#include <QApplication>
#include "ui_checkabder.h"
#include <QDialog>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Ui::CheckAbder ui;
QDialog *dialog = new QDialog;
ui.setupUi(dialog);
dialog->show();
return app.exec();
}
I get the following errors:
c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):-1: In function `WinMain@16':
c:/ndk_buildrepos/qt-desktop/src/winmain/qtmain_win.cpp:131: error: undefined reference to qMain(int, char **)
:-1: error: collect2: ld returned 1 exit status
And, abder.pro looks like this:
######################################################################
# Automatically generated by qmake (2.01a) Mon Apr 18 09:52:56 2011
######################################################################
TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
# Input
FORMS += checkabder.ui
How can I solve those errors? Provided that I'm using Qt Creator.
Thanks.