Linux Object-C 编译环境安装

来源:互联网 发布:python array转置 编辑:程序博客网 时间:2024/05/01 12:27

原文: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 <Foundation/Foundation.h>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

结束

原创粉丝点击