Objective-C Command Line Program
Simplest Objective-C program (for Mac):
#import
int main( int argc, const char* argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSObject *object = [[NSObject alloc] init];
NSLog(@"Created Object: %@", object);
[pool release];
return 0;
}
and how to compile it:
gcc main.m -o main -ObjC -framework Foundation
The -framework parameter is the obscure part.

