Built and ran this simple console app, but don't see anything?
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// insert code here...
开发者_StackOverflow社区 NSLog(@"Hello world!");
[pool drain];
return 0;
}
I'm using xcode, and when I build and run I don't see the output.
Is it opening and closing really fast?
You have to display the Console window manually via Run -> Console or Shift + Cmd + R
Yes it is. When doing stuff like this, I generally put a breakpoint on the [pool drain]
line, and Build and Debug. Then my log messages show up in the Console. :)
精彩评论