PDA

View Full Version : compilling in linux mandriva



newplayer
6th July 2008, 20:55
I have 'main.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();
}


How can I compile it ?


c++ -o prog main.cpp doesn't work

jpn
6th July 2008, 21:10
See commands and their explanations at the end of Tutorial 1 (http://doc.trolltech.com/4.4/tutorials-tutorial-t1.html).

newplayer
6th July 2008, 22:11
but:



qmake -project
bash: qmake: command not found

munna
7th July 2008, 07:15
Which means Qt is not installed properly on your system. Try setting /path/to/Qt/bin in your PATH variable and run the qmake command again.

Also, did you create the .pro file for your project?