GNUstep ObjectC Ubuntu

1.新得利中安装gnustep,gnustep-devel,libgnustep-base-dev,gnustep-games及其依赖文件

2.~/.bashrc文件后加入:
  export GNUstep_ROOT=/usr/share/GNUstep
  export GNUSTEP_HOME=/usr/share/GNUstep
  export LIBRARY_PATH=/usr/share/GNUstep/Libraries
  export GNUSTEP_MAKEFILES=/usr/share/GNUstep/Makefiles
  source /usr/share/GNUstep/Makefiles/GNUstep.sh

3.执行GNUstep.sh脚本,自动加载其他环境PATH:
  chmod +x /usr/share/GNUstep/Makefiles/GNUstep.sh

4.source ~/.bashrc重新载入配置

5.配置自己的VIM,下载object-c插件,解压到/usr/share/vim/vim73目录下

6.测试在/tmp/test下新建hello.m内容为:

#import <Foundation/NSString.h>
#import <stdio.h>
int main(int argc,char *argv[]){
    NSString *aa=@"hello word!";
    NSLog(@"length is %d\n",[aa length]);
    return (0);
}

  在/tmp/test/下新建GNUmakefile:

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME=MyTest
MyTest_OBJC_FILES=hello.m
include $(GNUSTEP_MAKEFILES)/tool.make

  终端中执行:

sudo chmod a+x /usr/share/GNUstep/Makefiles/GNUstep.sh
. /usr/share/GNUstep/Makefiles/GNUstep.sh
make
ls
cd obj/
ls
./MyTest

7.图形界面开发(GNUstep Renaissance)(gnustep-make,gnustep-base,gnustep-gui,gnustep-back)

  install Renaissance for linux

参考:

http://www.gnustep.org/

GNUstep Resources

http://www.oschina.net/question/54100_32609

http://www.gnustep.org/resources/documentation/Developer/Base/ProgrammingManual/manual_1.html#GNUstep-Base-Library

原文地址:https://www.cnblogs.com/wen12128/p/2776059.html