Linux Object-C 编译环境安装

原文:http://www.techotopia.com/index.php/Installing_and_Using_GNUstep_and_Objective-C_on_Linux


sudo apt-get install gnustep
sudo apt-get install gnustep-devel
sudo apt-get install gobjc
. /usr/share/GNUstep/Makefiles/GNUstep.sh
#import 

int main (int argc, const char * argv[])
{
        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

        NSLog (@"hello world");
        [pool drain];
        return 0;
}
gcc `gnustep-config --objc-flags` -lgnustep-base hello.m -o hello
./hello

结束

你可能感兴趣的:(Tools,&,Software)