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:
QProcess exec; exec.start( "who|cut -d' ' -f1|sort -u" ); exec.waitForFinished(); int exitcode = exec.exitCode(); // exitcode is always 255!To copy to clipboard, switch view to plain text mode
Thanks!!
Bookmarks