I've vb.net form with several textboxes and in the code I've defined a process that starts a GCC (MinGW) compiler. The compiler then compiles a C++ file as shown in the code below.
Dim proc As ProcessStartInfo = New ProcessStartInfo("cmd.exe", "/k")Dim pr As Processpr = Process.Start(proc)pr.StandardInput.WriteLine("g++ test.cpp -o test")
If the compilation succeeds it creates an exe file. If the compilation fails it displays the errors (syntax errors, divide by zero errors, etc) that caused the compilation to fail. Now what I want to do is I want to capture the output messages such as error messages, warning messages among other messages from the compiler and display the error and warning messages in seperate textboxes and then count the number of errors and warnings. How do I capture the output messages of GCC compiler?