#include"say.h"#include<Foundation/Foundation.h>intmain(void){idspeaker;NSString*name=@"GNUstep!";NSAutoreleasePool*pool;NSArray*outArray;pool=[NSAutoreleasePoolnew];speaker=[[Sayalloc]init];outArray=[[NSArrayalloc]initWithObjects:@"Msg1",@"Msg2",@"Msg3",@"Msg4",nil];//printf("%@\n",[outArrayobjectAtIndex:0]);//GNUstep下只输出了@//GSPrintf(stdout,"%@",[outArrayobjectAtIndex:1]);//GNUstep下崩溃NSLog(@"%@\n",[outArrayobjectAtIndex:2]);//GNUStep下ok[speakersayHello];[speakersayHelloTo:name];RELEASE(speaker);RELEASE(pool);#ifdefDEBUGNSLog(@"%@\n",@"DebugNow");#endifreturn0;}