Your question would be better suited to the qt-interest mailing list; this list is dedicated to the Qt Creator IDE. That said, your problem is because you tried to compile the source file directly. Qt comes with a tool called qmake that generates a Makefile that connects all of the appropriate Qt components. Try writing, building, and running your program in Creator, which will automate the qmake process for you.
/s/ Adam On Thu, Oct 15, 2009 at 7:23 PM, <[email protected]> wrote: > > hello there > I want to know, how can i compile this code in Windows > +++++++++++++++++++++++++++++++++++++++++++#include < QApplication.h >#include > < QMainWindow.h > > class Form1 : public QMainWindow{Q_OBJECTpublic:Form1(QWidget *parent = 0, > Qt::WFlags flags = 0) {}~Form1() {}};int main(int argc, char * > argv[]){QApplication > a(argc, argv); > Form1 * frm = new Form1();frm->setWindowTitle("Hello Word !!!"); > frm->show(); > return a.exec();}+++++++++++++++++++++++++++++++++++++++++++ > i save this data in test.cpp fileandi run this command in command prompt > C:\Qt\4.5.2-vc\mingw\bin\gcc.exe -I C:\Qt\4.5.2-vc\qt\include -I > C:\Qt\4.5.2-vc\qt\include\QtGui test.cpp -c -o test.execompiler > successfuly compiled this fileBUTwhen i double click on the output file > (test.exe)i see an empty command prompt screenand there is nothing about > windows (QMainWindow) > I am looking forward to hearing from youBest Regards > > _______________________________________________ > Qt-creator mailing list > [email protected] > http://lists.trolltech.com/mailman/listinfo/qt-creator > >
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
