public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Ouptput question
@ 1999-09-28 17:03 JSONCRAIG
  1999-09-28 17:15 ` Ajit George
  1999-09-30 23:42 ` JSONCRAIG
  0 siblings, 2 replies; 10+ messages in thread
From: JSONCRAIG @ 1999-09-28 17:03 UTC (permalink / raw)
  To: cygwin

This may sound really stupid but I can't get the output from compiling 
(warnings, erros, etc.) to be put into a text file.  I'm guessing it has 
something to do with c++.exe passing execution to cc1plus.exe.

Anyway, I've tried the following to no avail:
  $ c++ -o foo.exe foo.cpp > out.txt
  $ c++ -o foo.exe foo.cpp >> out.txt

This sounds like a real beginner problem, but I still can't figure it out and 
with STLs many templates getting expanded in a few compile-time errors, it's 
not rare to have an error go over 4 screens of info.

Thanks,
Jason

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Ouptput question
  1999-09-28 17:03 Ouptput question JSONCRAIG
@ 1999-09-28 17:15 ` Ajit George
  1999-09-30 23:42   ` Ajit George
  1999-09-30 23:42 ` JSONCRAIG
  1 sibling, 1 reply; 10+ messages in thread
From: Ajit George @ 1999-09-28 17:15 UTC (permalink / raw)
  To: JSONCRAIG, cygwin

Errors get printed to stderr, not stdout.  The following should work:

c++ foo.exe foo.cpp > out.txt 2>&1

Ajit

-----Original Message-----
From:	cygwin-owner@sourceware.cygnus.com
[ mailto:cygwin-owner@sourceware.cygnus.com ] On Behalf Of JSONCRAIG@aol.com
Sent:	Tuesday, September 28, 1999 7:03 PM
To:	cygwin@sourceware.cygnus.com
Subject:	Ouptput question

This may sound really stupid but I can't get the output from compiling
(warnings, erros, etc.) to be put into a text file.  I'm guessing it has
something to do with c++.exe passing execution to cc1plus.exe.

Anyway, I've tried the following to no avail:
  $ c++ -o foo.exe foo.cpp > out.txt
  $ c++ -o foo.exe foo.cpp >> out.txt

This sounds like a real beginner problem, but I still can't figure it out
and
with STLs many templates getting expanded in a few compile-time errors, it's
not rare to have an error go over 4 screens of info.

Thanks,
Jason

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* RE: Ouptput question
  1999-09-28 17:15 ` Ajit George
@ 1999-09-30 23:42   ` Ajit George
  0 siblings, 0 replies; 10+ messages in thread
From: Ajit George @ 1999-09-30 23:42 UTC (permalink / raw)
  To: JSONCRAIG, cygwin

Errors get printed to stderr, not stdout.  The following should work:

c++ foo.exe foo.cpp > out.txt 2>&1

Ajit

-----Original Message-----
From:	cygwin-owner@sourceware.cygnus.com
[ mailto:cygwin-owner@sourceware.cygnus.com ] On Behalf Of JSONCRAIG@aol.com
Sent:	Tuesday, September 28, 1999 7:03 PM
To:	cygwin@sourceware.cygnus.com
Subject:	Ouptput question

This may sound really stupid but I can't get the output from compiling
(warnings, erros, etc.) to be put into a text file.  I'm guessing it has
something to do with c++.exe passing execution to cc1plus.exe.

Anyway, I've tried the following to no avail:
  $ c++ -o foo.exe foo.cpp > out.txt
  $ c++ -o foo.exe foo.cpp >> out.txt

This sounds like a real beginner problem, but I still can't figure it out
and
with STLs many templates getting expanded in a few compile-time errors, it's
not rare to have an error go over 4 screens of info.

Thanks,
Jason

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Ouptput question
  1999-09-28 17:03 Ouptput question JSONCRAIG
  1999-09-28 17:15 ` Ajit George
@ 1999-09-30 23:42 ` JSONCRAIG
  1 sibling, 0 replies; 10+ messages in thread
From: JSONCRAIG @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

This may sound really stupid but I can't get the output from compiling 
(warnings, erros, etc.) to be put into a text file.  I'm guessing it has 
something to do with c++.exe passing execution to cc1plus.exe.

Anyway, I've tried the following to no avail:
  $ c++ -o foo.exe foo.cpp > out.txt
  $ c++ -o foo.exe foo.cpp >> out.txt

This sounds like a real beginner problem, but I still can't figure it out and 
with STLs many templates getting expanded in a few compile-time errors, it's 
not rare to have an error go over 4 screens of info.

Thanks,
Jason

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
  1999-09-28 21:05 ` Ross Smith
  1999-09-29 17:10   ` John Aitchison
@ 1999-09-30 23:42   ` Ross Smith
  1999-09-30 23:42   ` John Aitchison
  2 siblings, 0 replies; 10+ messages in thread
From: Ross Smith @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

JSONCRAIG@aol.com wrote:
> 
> c++ -o foo.exe -g -v foo.cpp 2>&1 | tee out.txt
> 
> the last two lines of output are this:
>      as -o C:\WINDOWS\TEMP\ccR9Mhgb.o C:\WINDOWS\TEMP\ccI0Figb.s
>     Bad command or file name
> 
> The file &1 is created and out.txt is not.  I'm using GCC-2.95 Mingw32, from
> Mumits site.  Any ideas?

Are you running this from a Bash shell, a Windows 95/98 command line, or
a Windows NT/2000 command line?

In a Bash shell, you redirect both stdout and stderr to the same file
with &>file.

In an NT shell, you can't redirect them both to the same file, but you
can send them to two separate files with >file1 2>file2. (Using the same
filename for both doesn't work.)

In a Win9x shell, you can't redirect stderr at all.

--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
  "There are many technical details that make Linux attractive to the
  sort of people to whom technical details are attractive."   -- Suck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
  1999-09-28 19:18 JSONCRAIG
  1999-09-28 21:05 ` Ross Smith
@ 1999-09-30 23:42 ` JSONCRAIG
  1 sibling, 0 replies; 10+ messages in thread
From: JSONCRAIG @ 1999-09-30 23:42 UTC (permalink / raw)
  To: fortinj; +Cc: cygwin

c++ -o foo.exe -g -v foo.cpp 2>&1 | tee out.txt

the last two lines of output are this:
     as -o C:\WINDOWS\TEMP\ccR9Mhgb.o C:\WINDOWS\TEMP\ccI0Figb.s
    Bad command or file name

The file &1 is created and out.txt is not.  I'm using GCC-2.95 Mingw32, from 
Mumits site.  Any ideas?

Jason

 > try
>  
>  c++ -o foo.exe foo.cpp 2>&1 | tee out.txt   
>  
>  the 2>&1 sends stderr to stdout.  then pipe it to tee which will print
>  it to the screen AND to a file.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
  1999-09-28 21:05 ` Ross Smith
  1999-09-29 17:10   ` John Aitchison
  1999-09-30 23:42   ` Ross Smith
@ 1999-09-30 23:42   ` John Aitchison
  2 siblings, 0 replies; 10+ messages in thread
From: John Aitchison @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Ross Smith, cygwin, JSONCRAIG

> 
> In a Win9x shell, you can't redirect stderr at all.

redir on DJ Delorie's site (I think www.delorie.com) will let you do this. 
Basically redir is a wrapper that spawns your prog .. works just fine with 
eg g77 where I had the same problem under Win95


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
  1999-09-28 21:05 ` Ross Smith
@ 1999-09-29 17:10   ` John Aitchison
  1999-09-30 23:42   ` Ross Smith
  1999-09-30 23:42   ` John Aitchison
  2 siblings, 0 replies; 10+ messages in thread
From: John Aitchison @ 1999-09-29 17:10 UTC (permalink / raw)
  To: Ross Smith, cygwin, JSONCRAIG

> 
> In a Win9x shell, you can't redirect stderr at all.

redir on DJ Delorie's site (I think www.delorie.com) will let you do this. 
Basically redir is a wrapper that spawns your prog .. works just fine with 
eg g77 where I had the same problem under Win95


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
  1999-09-28 19:18 JSONCRAIG
@ 1999-09-28 21:05 ` Ross Smith
  1999-09-29 17:10   ` John Aitchison
                     ` (2 more replies)
  1999-09-30 23:42 ` JSONCRAIG
  1 sibling, 3 replies; 10+ messages in thread
From: Ross Smith @ 1999-09-28 21:05 UTC (permalink / raw)
  To: cygwin

JSONCRAIG@aol.com wrote:
> 
> c++ -o foo.exe -g -v foo.cpp 2>&1 | tee out.txt
> 
> the last two lines of output are this:
>      as -o C:\WINDOWS\TEMP\ccR9Mhgb.o C:\WINDOWS\TEMP\ccI0Figb.s
>     Bad command or file name
> 
> The file &1 is created and out.txt is not.  I'm using GCC-2.95 Mingw32, from
> Mumits site.  Any ideas?

Are you running this from a Bash shell, a Windows 95/98 command line, or
a Windows NT/2000 command line?

In a Bash shell, you redirect both stdout and stderr to the same file
with &>file.

In an NT shell, you can't redirect them both to the same file, but you
can send them to two separate files with >file1 2>file2. (Using the same
filename for both doesn't work.)

In a Win9x shell, you can't redirect stderr at all.

--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
  "There are many technical details that make Linux attractive to the
  sort of people to whom technical details are attractive."   -- Suck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Ouptput question
@ 1999-09-28 19:18 JSONCRAIG
  1999-09-28 21:05 ` Ross Smith
  1999-09-30 23:42 ` JSONCRAIG
  0 siblings, 2 replies; 10+ messages in thread
From: JSONCRAIG @ 1999-09-28 19:18 UTC (permalink / raw)
  To: fortinj; +Cc: cygwin

c++ -o foo.exe -g -v foo.cpp 2>&1 | tee out.txt

the last two lines of output are this:
     as -o C:\WINDOWS\TEMP\ccR9Mhgb.o C:\WINDOWS\TEMP\ccI0Figb.s
    Bad command or file name

The file &1 is created and out.txt is not.  I'm using GCC-2.95 Mingw32, from 
Mumits site.  Any ideas?

Jason

 > try
>  
>  c++ -o foo.exe foo.cpp 2>&1 | tee out.txt   
>  
>  the 2>&1 sends stderr to stdout.  then pipe it to tee which will print
>  it to the screen AND to a file.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-28 17:03 Ouptput question JSONCRAIG
1999-09-28 17:15 ` Ajit George
1999-09-30 23:42   ` Ajit George
1999-09-30 23:42 ` JSONCRAIG
1999-09-28 19:18 JSONCRAIG
1999-09-28 21:05 ` Ross Smith
1999-09-29 17:10   ` John Aitchison
1999-09-30 23:42   ` Ross Smith
1999-09-30 23:42   ` John Aitchison
1999-09-30 23:42 ` JSONCRAIG

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).