Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » printing MinGW return
printing MinGW return [message #40239] Tue, 09 July 2013 12:54 Go to next message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hello folks

I am compiling with MinGW 32 bit at Win 7 using the command-line. It is working fine in general, just the compiler-return is being printed at screen only.

I would like to get it printed into a file, but the usual approaches do not work:

type mingw ARGS > return.txt
echo mingw ARGS > return.txt
copy mingw ARGS > return.txt
ctty PRN


The DOS-ref says that "stderr" cannot be redirected, as anyone had the religion "they should see the errors on screen always".
Can anyone give me a hint, how to get the errors into "return.txt"?

kind greets
Martin
Re: printing MinGW return [message #40240 is a reply to message #40239] Tue, 09 July 2013 13:41 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello, Martin.
amando1957 wrote on Tue, 09 July 2013 12:54

Can anyone give me a hint, how to get the errors into "return.txt"?

According to "Using command redirection operators" article, you could use following command (note about 2> instead of >):
mingw ARGS 2> return.txt

But if
mingw ARGS

didn't return anything to the command prompt, then this might be doesn't help.

[Updated on: Tue, 09 July 2013 13:49]

Report message to a moderator

Re: printing MinGW return [message #40241 is a reply to message #40239] Tue, 09 July 2013 20:11 Go to previous message
amando1957 is currently offline  amando1957
Messages: 57
Registered: November 2007
Location: Wien/Vienna/Viden
Member
Hello

Full-top, this is working! Smile
As you wrote: in some cases there are no errors, and I am using the -w. It creates an empty file in this case.

Thanks a lot...

have a nice day
Martin
Previous Topic: diff/patch for Strings
Next Topic: error in examples
Goto Forum:
  


Current Time: Fri Mar 29 07:08:19 CET 2024

Total time taken to generate the page: 0.01360 seconds