object-c ubuntu下开发环境搭建
2016-01-04 14:21
465 查看
1. 安装gnustep和gobjc
sudo apt-get install gnustep gnustep-devel gobjc
2. 示例代码
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
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
相关文章推荐
- Objective-C Runtime 运行时之一到六
- Objective-C Runtime
- objective-c code style
- js判断object类型
- String.valueof(null) 与 String.valueof((Object)null)
- 探讨WaitForMultipleObjects如何突破64个句柄的限制
- Objective-C 与Swift - UIView中的- (void)drawRect:(CGRect)rect
- iOS UIView动画详解(Objective-C)
- Objective-C 去掉NSString 前后中空格
- 分享你最喜欢的技巧和提示(Xcode,Objective-C,Swift,C...等等)
- 黑马程序员——常用API详解之Object、Scanner、String
- objective-c 苹果官方NSLayoutConstraint 页面布局
- OBjective-c 第三方布局 Masonry
- GitHub Top 100 简介(Objective-C 项目 )
- Entity Framework 出现 "此 ObjectContext 实例已释放,不可再用于需要连接的操作" 的错误
- 每日一vim(18)Text-Object
- 2006-7有价值的Kean博客——Calling ObjectARX functions from a .NET Application(PInvoke)
- Objective-C开发者,一天学会swift
- 图像目标检测(Object Detection)原理与实现(三)
- 图像目标检测(Object Detection)原理与实现(二)