Hi,
I have been trying to learn Qt on a Windows XP system and to do that I downloaded MingW C++ compiler and a few other MingW packages.
Then I installed the Qt4 OpenSource Edition and installed it with MingW compiler
then, when I try to compile a "hello world!" program, I am getting errors which I am not able to understand
what I did is this,
create a directory called "hello" and inside it, put a file called "hello.cpp"
Code:
/*
hello.cpp
*/
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
The following are the commands that I executed and the messages that were displayed
Code:
F:\cpp\hello>qmake -project
F:\cpp\hello>qmake
F:\cpp\hello>make
make.exe -f Makefile.Debug
make.exe[1]: Entering directory `/f/cpp/hello'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"E:/Qt/4.1.4/
include/QtCore" -I"E:/Qt/4.1.4/include/QtGui" -I"E:/Qt/4.1.4/include" -I"." -I"E
:/Qt/4.1.4/include/ActiveQt" -I"debug" -I"." -I"e:\Qt\4.1.4\mkspecs\win32-g++" -
o debug\hello.o hello.cpp
g++.exe: no input files
make.exe[1]: *** [debug\hello.o] Error 1
make.exe[1]: Leaving directory `/f/cpp/hello'
make.exe: *** [debug] Error 2
F:\cpp\hello>
Please tell me what is wrong and how I should fix it
Thank you very much