// cc -o myAppNameHere -framework Foundation simpleFramework.m #import <Foundation/Foundation.h> int main (int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@"pls put my code here~\n%@", NSUserName()); [pool release]; } BTW,gcc test.m -framework Cocoa -o cli_test也可以 Powered By Lvyile :) |