Piping Compiler Output

Phil Edwards phil@jaj.com
Sat Aug 31 21:33:00 GMT 2002


On Sun, Sep 01, 2002 at 12:06:26PM +1000, Scott Barnett wrote:
> Hello,
> 
> I'd like to write the output of the gcc compiler to a file (logging). I've
> tried using the > operator, but that doesn't seem to work,

The compiler also writes to standard error.  How to redirect that depends on
your shell.  Try

    gcc ..... > file 2>&1


Phil

-- 
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
                                                 - Edsger Dijkstra, 1930-2002



More information about the Gcc mailing list