Hi,

My program needs to get a list of users on the system. From linux shell it works fine:
# who | cut -d' ' -f1 | sort -u

When I start this from code I get an error with exit code 255. I've read that this means that some libraries can't be found. What libraries are necessary and how and where to declare them for C++ program? Are these libraries for who, cut and sort commands?

Qt Code:
  1. QProcess exec;
  2. exec.start( "who|cut -d' ' -f1|sort -u" );
  3. exec.waitForFinished();
  4. int exitcode = exec.exitCode(); // exitcode is always 255!
To copy to clipboard, switch view to plain text mode 

Thanks!!