PDA

View Full Version : Error during qmake hello.pro command execution



sankar
9th February 2011, 08:08
Hi All,
I tried to use the following sample hello world program.


#include "QApplication"
#include "QLabel"

int main(int arg c, char* argv[])
{
QApplication app(argc, arv);
QLabel *myLabel = new QLabel("Hello World");
myLabel->show();
return app.exec();
}

1. Ran qmake -project and it created hello.pro file as expected.
2. Ran qmake hello.pro, but it throws the following error,

C:\Qt Samples\hello>qmake -project

C:\Qt Samples\hello>qmake hello.pro
Error processing meta file: c:\Qt\4.5.0\lib\qtmain
Error processing meta file: c:\Qt\4.5.0\lib\qtmaind
Error processing meta file: c:\Qt\4.5.0\lib\qtmain

Could you tell me how to resolve this issue. Thanks.

Regards,
Sankar.

Lykurg
9th February 2011, 08:27
Try to use
#include <QApplication>
#include <QLabel> and how does your pro file looks like? Further, please use the code tags!

sankar
9th February 2011, 09:33
Thanks Lykurg.

I tried to modify the include statement as per your suggestion. But still I have the same problem.

The hello.pro file is shown below for you reference,
################################################## ####################
# Automatically generated by qmake (2.01a) Wed Feb 9 15:00:47 2011
################################################## ####################

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
SOURCES += hello.cpp

Regards,
Sankar.