Re: Equivalent to a Win32 console application?
Re: Equivalent to a Win32 console application?
- Subject: Re: Equivalent to a Win32 console application?
- From: Jens Alfke <email@hidden>
- Date: Mon, 14 Sep 2009 10:37:03 -0700
On Sep 14, 2009, at 9:11 AM, Guillaume Billard wrote:
- When launched from the terminal, the app should only display
"console output".
- When launched from Xcode, the Xcode console should only display
"debug output", and the app console should only display "standalone
output".
The Unix-y way to do this is some combination of
- Command-line flags like "-v" to enable verbose or debugging output.
You can use the Executable panel in Xcode to add this as an argument
when Xcode runs your program.
- Explicitly redirecting unwanted output to /dev/null, for example
using "mytool >& /dev/null" to suppress stderr. You can't do this from
Xcode though, because Xcode doesn't run your code via a shell.
You can try to get clever by detecting what type of thing your stderr
and stdout file descriptors are connected to, for example not writing
to stderr if it's connected to a TTY. This makes your tool less useful
for advanced uses, though, like piping it into other tools or calling
it from scripts.
- cout output is displayed in the Xcode console. Is there a way to
avoid this?
Only by programmatically deciding not to write to stdout.
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden