This is not a question about C/C++ as such, but I couldn't think of where else to put it.
I would like to know how to call either gcc or g++ and specifying that all error messages that are to occur when compiling some source code are to be written to a file. for example..
// HelloWorld.cpp
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World\n";
this_is_my_code_error;
}
I have tried to call g++ like this to get the error..
g++ "C:\HelloWorld.cpp" > "C:\output.txt"
the file output.txt was created but it did not contain anything, i.e. the error the compiler found in the source code was not written to that file.
I'm running Windows XP.
Thanks.