// First program example
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// Simple text output
NSLog (@"In Objective-C, lowercase leters are significant.");
NSLog (@"main is where program execution begins.");
NSLog (@"Open and close braces enclose program statements in a routine.");
NSLog (@"All program statements must be terminated by a semicolon.");
[pool drain];
return 0;
}
[Session started at 2010-03-07 14:32:52 -0800.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys001
Loading program into debugger…
Program loaded.
run
[Switching to process 11197]
Running…
2010-03-07 14:32:52.409 Prog1[11197:a0f] In Objective-C, lowercase leters are significant.
2010-03-07 14:32:52.411 Prog1[11197:a0f] main is where program execution begins.
2010-03-07 14:32:52.411 Prog1[11197:a0f] Open and close braces enclose program statements in a routine.
2010-03-07 14:32:52.412 Prog1[11197:a0f] All program statements must be terminated by a semicolon.
Debugger stopped.
Program exited with status value:0.
I knew that way would work. I would like to know why the first way I tried failed tho.