This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: undefined references for GUI library using Mingw32

dale henderson wrote:

> >But where is the problem report????  I don't have the time to go
> >through
> I am not able to pipe the errors msgs from the compile to a file.
> Here is an example:

make >& file

will redirect both stdout and stderr of make (and everything called by
make, such as gcc) to a file. 'Course, you won't see anything in your
terminal window...

So, you could try the following:

make 2>&1 | tee file

which (1) sets up a pipe to tee.exe -- i.e. stdout from make now points to
stdin of tee (2) makes filedescriptor 2 (stderr) of make go to wherever
filedescriptor 1 (stdout) is currently pointing -- which is the stdin of
tee. Thus, tee gets both stdout and stderr. Tee is a program which copies
its stdin to a file, and to stdout; it's distributed with cygwin.

Cmd.exe also lets you do redirection in this manner, but you need either a
native version of tee, or you can use the cygwin version of tee, but then
things get hairy with path specifiers ( '/' vs '\'. I suppose you could use
cygpath somehow). You can get a native port of tee (and ports of a lot of
other gnu-ish stuff) from Also,
Anders Norlander has built mingw ports of a lot of gnu stuff - but not tee. doesn't do this kind of redirection, so you need an
external program, similar to the redir.exe that comes with djgpp. You can
get that program from,
but it is intended for DOS and doesn't grok long filenames. I'm not sure
why that matters, since redir doesn't really _do_ anything with the LFN's
if they are there. Maybe it's related to the internal system() or spawnXX()
call in redir. I dunno - it mostly works. Try

redir -eo make | tee file


Want to unsubscribe from this list?
Send a message to