PDA

View Full Version : Getting errors from Gcc as a text file



aaditya190
16th January 2014, 10:49
Is it possible to get errors from gcc in the form of text and then store it in some file? I am sending some code from a textedit in gui to the gcc compiler. If there are some compile time errors in the code, can I get them through some means in a file??

ChrisW67
16th January 2014, 23:36
Yes you can, but you almost certainly do not need to because you can get any output directly through QProcess.
http://www.qtcentre.org/threads/57618-How-to-invoke-Mingw-Compiler

If, as in the thread above, you are using QProcess to start a batch file that runs the compiler you could also use the file redirection capabilities of the batch file to capture the output. This has nothing to do with Qt.