Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2002 23:24:48 +0200
From:      Hanspeter Roth <hanspeter_roth@hotmail.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: execution of cc question
Message-ID:  <20020824232448.A968@gicco.cablecom.ch>
In-Reply-To: <200208242058.NAA16603@idk.com>; from tony@idk.com on Sat, Aug 24, 2002 at 01:58:12PM -0700
References:  <200208242058.NAA16603@idk.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  On Aug 24 at 13:58, Tony spoke:

> I am running csh and trying to compile a c program.
> 
> When compiled the programs generates a lot of errors. The error that is
> causes the problem is scrolled off the screen too fast to read.
> 
> How do I redirect the output of cc to more or better yet to a file.

Your c compiler probably issues the error messages on the standard
error channel.

In csh style shells you can't divert standard output and error
output to different files.
You can however divert both to the same file. This is done via >&.
For example:

make prog >& made.log

There are editors like emacs and vim that let you compile from
within the editing session.

If you use vim you can compile by :make prog<CR> and then then
browse errors by :cnext<CR>.

You may put something like the following into ~/.vimrc

map <F5> :cnext<CR>
map <F6> :cNext<CR>
set cmdheight=2

Then you can browse errors by pressing <F5>.

-Hanspeter

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020824232448.A968>