Re: How to separate stdout/stderr when running inside Xcode
Re: How to separate stdout/stderr when running inside Xcode
- Subject: Re: How to separate stdout/stderr when running inside Xcode
- From: p3consulting <email@hidden>
- Date: Sat, 6 Mar 2004 10:19:12 +0100
stdout and stderr are FILE *
The FILE struct has a field _write which is a pointer to a
int writeProc(void *inFD, const char *buffer, int size)
so just do at beginning of the program
stderr->_write = myOwnWriteProc ;
and redirect the stream to where you like to from your write proc.
Pascal Pochet
email@hidden
On 6 mars 2004, at 07:01, email@hidden wrote:
> Message: 4
> To: xCode List <email@hidden>
> From: Thomas Lachand-Robert <email@hidden>
> Subject: How to separate stdout/stderr when running inside Xcode
> Date: Fri, 5 Mar 2004 22:10:54 +0100
>
> Hi all,
>
> I'm currently working on a Foundation tool, and I have a number of
> tests I run directly from Xcode. Ther eis a lot of output produced by
> the tool, some to stdout, some to stderr. I can read both in the Run
> window, but I would like to have then separated, with the stderr output
> sent to a file.
>
> I tried to add '&2>somefile' has a command line argument, but it
> doesn't work. (But it confuses the debugger when debugging: gdb does
> not find files in that case.)
>
> Thanks,
>
> Thomas Lachand-Robert
> ********************** email@hidden
> << Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.