object-c ubuntu下开发环境搭建
来源:互联网 发布:曼朗网络 编辑:程序博客网 时间:2024/05/21 20:27
1. 安装gnustep和gobjc
sudo apt-get install gnustep gnustep-devel gobjc
2. 示例代码
sudo apt-get install gnustep gnustep-devel gobjc
2. 示例代码
#import <Foundation/Foundation.h>int main (int argc, const char * argv[]){ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog (@"hello world"); [pool drain]; return 0;}
3. 编译
gcc `gnustep-config --objc-flags` hello.m -o hello -lgnustep-base
4. 运行
./hello
运行结果如下:
2016-01-04 14:16:03.705 hello[2405] hello world
参考:http://www.techotopia.com/index.php/Installing_and_Using_GNUstep_and_Objective-C_on_Linux
0 0
- Ubuntu下Object-C开发环境搭建
- Ubuntu下Object-C开发环境搭建
- object-c ubuntu下开发环境搭建
- Windows下搭建Object-C开发环境
- ubuntu下配置object c开发环境
- ubuntu搭建object-c环境
- GNUstep搭建Object-C开发环境-debian, ubuntu
- Ubuntu下Objective-C开发环境搭建
- Ubuntu下搭建C/C++开发环境
- Ubuntu下搭建C/C++开发环境
- Ubuntu下搭建C/C++开发环境
- Ubuntu下搭建C/C++开发环境
- Ubuntu下搭建Objective-C开发环境
- Ubuntu下Objective-C开发环境搭建
- Ubuntu9.10下搭建Object-C开发环境
- 利用GNUstep搭建windows下object-c的开发环境
- 在Codeblocks 下搭建开发 Object-C 环境
- Ubuntu环境下搭建C/C++开发环境
- 23种设计模式知多少
- myeclipse 在线生成注册码
- c语言中同一函数下不可以重复定义变量
- 图像滤镜的一些加速和改进--笔记
- vim复制,粘贴,删除,撤销,替换,光标移动等用法
- object-c ubuntu下开发环境搭建
- STM8s003(也包括103)使用笔记
- 机器学习中的算法(1)-决策树模型组合之随机森林与GBDT
- OMS系统360浏览器无法登录问题
- Swift - Struct 與 Class 的差異性
- 05_重新打开已有工程(随手记)
- JavaScript 表单验证
- 在Magento页面左边增加分类菜单
- SAP Lumira连接数据库