PDA

View Full Version : Compile general C++ program from Qt



srinivasj
30th December 2008, 05:54
Hi All,
I want to compile a general c++ program from Qt while I click a Push button widget. How can I achieve that?

can I use shell script in Qt?

Thanks in Advance.

-Srinivas

jpn
30th December 2008, 07:08
See QProcess.

srinivasj
30th December 2008, 07:34
HI,

But using Q process I can only execute a process but I cannot compile right.

For example,

I have a program say helloworld.cpp. From the Qt application If I click on The QPushbutton I want to compile this helloworld program. How can I compile this? I did not find any oprion to compile the program using QProcess.

jpn
30th December 2008, 08:19
But using Q process I can only execute a process but I cannot compile right.
Compiler is a program that you can start with QProcess.


I have a program say helloworld.cpp.
It's not a program but a source file you pass as a parameter to the compiler.


From the Qt application If I click on The QPushbutton I want to compile this helloworld program. How can I compile this? I did not find any oprion to compile the program using QProcess.
QProcess is not only for compiling. QProcess wouldn't be too reusable if it was aimed for compilation processes only don't you think? QProcess is used to start any external program and to communicate with it.