How with QT can be checked that g++ exest in system.
How with QT can be checked that g++ exest in system.
The easiest way is to run it (for example with --version parameter). But you can't do more than that in an system-independent manner. On Linux you could check what package package manager is installed and query it, but if g++ was installed from sources it can be anywhere.
You can call system("which g++") or getenv("PATH"), split it with colons and check whether a g++ file exists in any of the path components. I think you could also call QProcess with "g++ -v" and see what result you get.
Bookmarks