public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* logging gcc messages
@ 2014-03-05 17:32 Michael Markowsky
  2014-03-05 17:34 ` Tim Prince
  2014-03-05 20:22 ` Jonathan Wakely
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Markowsky @ 2014-03-05 17:32 UTC (permalink / raw)
  To: gcc-help

Dear Madam , Dear Sir

I use gcc on a linux - system and wish to save the compiler messages for 
further analysation.
  so something like gcc filename.cpp>result.txt didn´t work

Any idea


many greetings

Michael Markowsky

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: logging gcc messages
  2014-03-05 17:32 logging gcc messages Michael Markowsky
@ 2014-03-05 17:34 ` Tim Prince
  2014-03-05 20:22 ` Jonathan Wakely
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Prince @ 2014-03-05 17:34 UTC (permalink / raw)
  To: gcc-help

On 3/5/2014 12:28 PM, Michael Markowsky wrote:
> Dear Madam , Dear Sir
>
> I use gcc on a linux - system and wish to save the compiler messages for
> further analysation.
>   so something like gcc filename.cpp>result.txt didn´t work
>
> Any idea
>

Check which shell you are running and look up how to redirect stderr to 
your file; e.g. for bash et al.
gcc filename.cpp>result.txt 2>&1


-- 
Tim Prince

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: logging gcc messages
  2014-03-05 17:32 logging gcc messages Michael Markowsky
  2014-03-05 17:34 ` Tim Prince
@ 2014-03-05 20:22 ` Jonathan Wakely
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2014-03-05 20:22 UTC (permalink / raw)
  To: Michael Markowsky; +Cc: gcc-help

On 5 March 2014 17:28, Michael Markowsky wrote:
> Dear Madam , Dear Sir
>
> I use gcc on a linux - system and wish to save the compiler messages for
> further analysation.
>  so something like gcc filename.cpp>result.txt didn´t work

As Tim said, you need to redirect stderr to the file, not just stdout.

N.B. you almost certainly want to use g++ to compile a C++ file, not gcc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-05 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 17:32 logging gcc messages Michael Markowsky
2014-03-05 17:34 ` Tim Prince
2014-03-05 20:22 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).