Hi everyone
I want to use Textpad to capture the output from a command which outputs to both the stdout and strerr file streams. Does anyone know how to set up Textpad successfully to do this?
Cheers!
John Pye
Capturing output from textpad Tools
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
ejg
Re: Capturing output from textpad Tools
You should'n need to worry about that.
If the "Capture output" flag is on both stdout and stderr are capured to the "Command Results" window.
Just set up the tool:
configure\preferences
Tools->Add->program
Then seletct your program and click apply
This should add the tool to your list. Just make sure the "Capture output" flag is on before you run the tool.
If the "Capture output" flag is on both stdout and stderr are capured to the "Command Results" window.
Just set up the tool:
configure\preferences
Tools->Add->program
Then seletct your program and click apply
This should add the tool to your list. Just make sure the "Capture output" flag is on before you run the tool.
-
John Pye
Re: Capturing output from textpad Tools
No, it didn't work. My command is 'make', and the stderr stream is not getting captured.
I think this is what happens:
textpad calls make
make calls gcc
gcc outputs to compilation errors to stderr
make outputs messages to stdout but does not capture make's stderr output
textpad catches make's stdout output but does not capture the stderr from gcc because make didn't pass it on
Any suggestions how to work around that curly question?
I think this is what happens:
textpad calls make
make calls gcc
gcc outputs to compilation errors to stderr
make outputs messages to stdout but does not capture make's stderr output
textpad catches make's stdout output but does not capture the stderr from gcc because make didn't pass it on
Any suggestions how to work around that curly question?
-
ejg
Re: Capturing output from textpad Tools
The clean and simple workaround would be to send make's stderr to stdout when you call it. Then you don't even have to think about this.
In UNIX it's just "make 2>&1" but I have no idea how this is done in Windows.
In UNIX it's just "make 2>&1" but I have no idea how this is done in Windows.
-
John Pye
Re: Capturing output from textpad Tools
That's right...
make 2>&1 works in windows as well, but Textpad doesn't capture in that case.
I think it might be because the GCC command *inside* my Makefile needs to be called with gcc x.c -o x.o etc etc 2>&1. But that's a pain, I need a windows-specific makefile then.
If a sub-process outputs to stderr and the parent process has a file stream mapping 2>&1, does that also map stderr outputs from sub-processes?
The whole problem here is that gnu make does not capture and pass on the stderr stream from its subcommands... it only does this with stdout.
I'll try the modified makefile.
Cheers!
make 2>&1 works in windows as well, but Textpad doesn't capture in that case.
I think it might be because the GCC command *inside* my Makefile needs to be called with gcc x.c -o x.o etc etc 2>&1. But that's a pain, I need a windows-specific makefile then.
If a sub-process outputs to stderr and the parent process has a file stream mapping 2>&1, does that also map stderr outputs from sub-processes?
The whole problem here is that gnu make does not capture and pass on the stderr stream from its subcommands... it only does this with stdout.
I'll try the modified makefile.
Cheers!