public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Capturing Error Output on DOS
@ 2003-10-25 13:23 Martijn Mulder
  2003-10-25 13:56 ` Sisyphus
  2003-10-27 13:05 ` Eljay Love-Jensen
  0 siblings, 2 replies; 3+ messages in thread
From: Martijn Mulder @ 2003-10-25 13:23 UTC (permalink / raw)
  To: gcc-help

Hi group,
 
I have a real stupid problem but it is getting to me. My 
'Hello World' program produces 6 pages of errors and 
warnings on compilation, and that is fine with me, but
I am not able to capture the output to a file.
 
I work from a DOS box under WindowsME.
 
Normally, I intercept error output like this:
C:\MinGW\bin\gcc.exe HelloWorld.cpp > error.txt
but with gcc it races over the screen and cannot
be captured. No 'tee' utility under DOS.
 
This is probably of-topic since it is DOS related but
in this mailing group others must have experienced
the same problem. If anyone can help? Thanks.
 
-X
 
 

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

* Re: Capturing Error Output on DOS
  2003-10-25 13:23 Capturing Error Output on DOS Martijn Mulder
@ 2003-10-25 13:56 ` Sisyphus
  2003-10-27 13:05 ` Eljay Love-Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Sisyphus @ 2003-10-25 13:56 UTC (permalink / raw)
  Cc: gcc-help

Martijn Mulder wrote:
> Hi group,
>  
> I have a real stupid problem but it is getting to me. My 
> 'Hello World' program produces 6 pages of errors and 
> warnings on compilation, and that is fine with me, but
> I am not able to capture the output to a file.
>  
> I work from a DOS box under WindowsME.
>  
> Normally, I intercept error output like this:
> C:\MinGW\bin\gcc.exe HelloWorld.cpp > error.txt
> but with gcc it races over the screen and cannot
> be captured. No 'tee' utility under DOS.
>  
> This is probably of-topic since it is DOS related but
> in this mailing group others must have experienced
> the same problem. If anyone can help? Thanks.
>  
> -X

Try:
C:\MinGW\bin\gcc.exe HelloWorld.cpp > error.txt 2>&1

That might not work either on WinME, in which case you would be best to 
obtain a shell that does understand '2>&1' and run your programs in 
that. (MSYS is one such shell - Google for 'MSYS' should do the trick.)

Alternatively, you might find the errors disappear altogether if you run:
C:\MinGW\bin\g++.exe HelloWorld.cpp

Note also that you shouldn't have to specify the '.exe' in the command, 
and if you set your path environment variable appropriately (which 
should get taken care of during configuration/installation wrt the MSYS 
shell) you'll be able to simply run:
gcc Hello.c
or
g++ Hello.cpp

Hth.

Cheers,
Rob


-- 
Any emails containing attachments will be deleted from my ISP's mail 
server before I even get to see them. If you wish to email me an 
attachment, please provide advance warning so that I can make the 
necessary arrangements.

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

* Re: Capturing Error Output on DOS
  2003-10-25 13:23 Capturing Error Output on DOS Martijn Mulder
  2003-10-25 13:56 ` Sisyphus
@ 2003-10-27 13:05 ` Eljay Love-Jensen
  1 sibling, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2003-10-27 13:05 UTC (permalink / raw)
  To: Martijn Mulder, gcc-help

Hi Martijn,

Rob pointed out MSYS as a replacement for COMMAND.COM (or is it CMD.COM with WinME?).

Two other excellent shell options:
Cygwin's bash shell (www.cygwin.com)
JPSoft's 4DOS shell (www.jpsoft.com)

Personally, I like Cygwin's bash shell.

JPSoft's 4DOS was sold with Norton Utilites as NDOS once-upon-a-time.  Also available as 4NT and 4OS2 shells.

Cygwin's bash shell is very Unix-y.  JPSoft's 4DOS shell is like COMMAND.COM on steroids.  I use them both.  Cygwin''s bash shell is priced right, JPSoft's 4DOS costs a little money (which I've paid, for 4NT ... I liked it that much!).

I haven't used MSYS.

HTH,
--Eljay


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

end of thread, other threads:[~2003-10-27 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-25 13:23 Capturing Error Output on DOS Martijn Mulder
2003-10-25 13:56 ` Sisyphus
2003-10-27 13:05 ` Eljay Love-Jensen

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