GNUstep Object-C 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 makelscd obj/ls./MyTest |
7.图形界面开发(GNUstep Renaissance)(gnustep-make,gnustep-base,gnustep-gui,gnustep-back)
参考:
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步