0

I want to use Qprocess to start other applications from linux c++ application.

I want to start and stop another application from my application.

How to link Qprocess to my build. Which .so files are required.

nayab
  • 2,216
  • 1
  • 15
  • 32

1 Answers1

2

QProcess is not a native c++ class, it is part of the Qt framework http://qt-project.org/
If you are simply looking for a solution to start another application from yours, you could e.g. look into system (http://www.cplusplus.com/reference/cstdlib/system/) which you should able to use easily (after including cstdlib of course).

If you need to get back the console output of your application popen (http://linux.die.net/man/3/popen) might be a possibility.

Erik
  • 1,925
  • 3
  • 22
  • 33
  • Thanks for reply. I tried system but there is no way to find pid to stop it. Also I looked into http://www.appinf.com/docs/poco/Poco.Process.html but its making the process zombie which starts application. I want to run both application simultaneously. – nayab Sep 26 '14 at 08:56
  • maybe http://www.highscore.de/boost/process0.5/boost_process/tutorial.html could be a possible route? – Erik Sep 26 '14 at 08:58
  • so far i tired qprocess and poco. I will try popen and boost process. – nayab Sep 26 '14 at 09:05
  • 1
    this thread on this site might give you some more hints http://stackoverflow.com/questions/1683665/where-is-boost-process – Erik Sep 26 '14 at 09:24
  • 1
    and this one also http://stackoverflow.com/questions/3329216/where-can-i-learn-how-to-make-a-c-program-interact-with-the-operating-system – Erik Sep 26 '14 at 09:29
  • thanks i will check and let you know popen and boost – nayab Sep 26 '14 at 09:30