redirecting stdout, stderr to console window?
I've been searching Apple's developer site, but all chaff and no wheat.
I believe the title says it all.
Are there C++ commands or system calls which would map cout and
cerr to the console window?
I believe the title says it all.
Are there C++ commands or system calls which would map cout and
cerr to the console window?
what do you mean?
if you run from the command-line, they'll go to the terminal window that runs the command
if you run from within Xcode, they'll go to Xcode's run log
if you run from the Finder, they'll go to the Console application
isn't that what you want?
if you run from the command-line, they'll go to the terminal window that runs the command
if you run from within Xcode, they'll go to Xcode's run log
if you run from the Finder, they'll go to the Console application
isn't that what you want?
I think I stayed on OS 9 way too long.
Tell you the truth, I've been doing #2 (from within Xcode) exclusively. And I have
been using Xcode's run log. Just now trying to branch out.
Ok, stupid question: How does one run an app from the command line?
I presume you open up a terminal window and cd to directory where the app resides.
Then I'm cluless. Though I do see exec, commands, jobs etc. when I type in help.
As for #3 running from the Finder, is that when you just double click on the application
icon? If so, then I think I need to rephrase my original premise: If you double click
on an application icon, the application doesn't start, and the console is empty, what
would be the next thing to try?
Tell you the truth, I've been doing #2 (from within Xcode) exclusively. And I have
been using Xcode's run log. Just now trying to branch out.
Ok, stupid question: How does one run an app from the command line?
I presume you open up a terminal window and cd to directory where the app resides.
Then I'm cluless. Though I do see exec, commands, jobs etc. when I type in help.
As for #3 running from the Finder, is that when you just double click on the application
icon? If so, then I think I need to rephrase my original premise: If you double click
on an application icon, the application doesn't start, and the console is empty, what
would be the next thing to try?
If you want to run it from the terminal (which is a good way to catch debugging output which would cause it to quit unexpectedly):
1) If it's a .app then just run /Users/myname/where/the/app/is/MyApp.app/Contents/MacOS/MyApp from the terminal (of course you can shorten that to a relative path if you want)
2) If it's not a bundle, just execute the file that is the application...
1) If it's a .app then just run /Users/myname/where/the/app/is/MyApp.app/Contents/MacOS/MyApp from the terminal (of course you can shorten that to a relative path if you want)
2) If it's not a bundle, just execute the file that is the application...
Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Thanks for the info! Seems I was trying to start the application file, when I should have been
starting the bundle. Now I see a permissions problem. Off to study permissions
starting the bundle. Now I see a permissions problem. Off to study permissions
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Classic console development kits, samples (Atari, Nintendo, Sega, Neo Geo, etc.) | smccd | 12 | 10,209 |
Jul 4, 2012 04:34 AM Last Post: smccd |
|

