Objective C for Windows
You can use Objective C inside the Windows environment. If you follow these steps, it should be working just fine:
- Visit the GNUstep website and download
GNUstep MSYS Subsystem
(MSYS for GNUstep),GNUstep Core
(Libraries for GNUstep), andGNUstep Devel
- After downloading these files, install in that order, or you will have problems with configuration
- Navigate to
C:\GNUstep\GNUstep\System\Library\Headers\Foundation
1 and ensure thatFoundation.h
exists - Open up a command prompt and run
gcc -v
to check thatGNUstep MSYS
is correctly installed (if you get a file not found error, ensure that thebin
folder ofGNUstep MSYS
is in yourPATH
) Use this simple "Hello World" program to test GNUstep's functionality:
#import <Foundation/Foundation.h> int main(int argc, char**argv)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"headfile dir is ok\n"); [pool release]; return ;
}Go back to the command prompt and
cd
to where you saved the "Hello World" program and then compile it:2gcc -o helloworld.exe <HELLOWORLD>.m -I /GNUstep/GNUstep/System/Library/Headers-L /GNUstep/GNUstep/System/Library/Libraries-std=c99 -lobjc -lgnustep-base -fconstant-string-class=NSConstantString
Finally, from the command prompt, type
helloworld
to run it
All the best, and have fun with Objective-C!
Objective C for Windows的更多相关文章
- Windows下编译objective-C
Windows下编译objective-C 2011-08-31 14:32 630人阅读 评论(0) 收藏 举报 windowscocoa工具objective clibraryxcode 目录 ...
- Generate Maximum revenue by selling K tickets from N windows
Objective: Given ‘N’ windows where each window contains certain number of tickets at each window. Pr ...
- Automake
Automake是用来根据Makefile.am生成Makefile.in的工具 标准Makefile目标 'make all' Build programs, libraries, document ...
- 13、jQueryMobile知识总结
1.jQueryMobile与jQuery的区别 jQueryMobile是一个为触控优化的框架,用于创建移动Web应用程序:构建于jQuery之上,适用于流行的智能手机和平板 基于jQuery的手机 ...
- Windows下搭建objective C开发环境
摘自:http://blog.csdn.net/zhanghefu/article/details/18320827 最近打算针对iPhone.iPod touch和iPad开发一些应用,所以,需要开 ...
- Windows在结构objective C开发环境
对于近期打算iPhone.iPod touch和iPad开发一些应用程序,所以.需要开始学习Objective C(苹果推出的类似C语言的开发语言).因为苹果的自我封闭的产业链发展模式(从芯片.机器. ...
- WINDOWS下如何安装GCC(转载http://nirvana.cublog.cn;作者:北斗星君(黄庠魁))
第一章 在视窗操作系统下的GCC 第一节 GCC家族概览 GCC 是一个原本用于 Unix-like 系统下编程的编译器.不过,现在 GCC 也有了许多 Win32 下的移植版本.所以,也许对于许多 ...
- Objective C运行时(runtime)
#import <objc/runtime.h> void setBeingRemoved(id __self, SEL _cmd) { NSLog(@"------------ ...
- MVA Universal Windows Apps系列学习笔记1
昨天晚上看了微软的Build 2015大会第一天第一场演讲,时间还挺长,足足3个小时,不过也挺震撼的.里面提到了windows 10.Microsoft edge浏览器.Azure云平台.Office ...
随机推荐
- 【Java】XML解析之DOM
DOM介绍 DOM(Document Object Model)解析是官方提供的XML解析方式之一,使用时无需引入第三方包,代码编写简单,方便修改树结构,但是由于DOM解析时是将整个XML文件加载到内 ...
- Asp.Net 基础理论
WebForm是微软开发的一款产品,它将用户的请求和响应都封装为控件.让开发者认为自己是在操作一个windows界面.极大地提高了开发效率. 在学习WebForm时,其知识量比WinForm要多,在实 ...
- git -- 出现冲突的情况
以下三点可能会出现冲突: 1 修改了同一个文件的同一行: 2 文件被重命名为不同的名字: 3 在一个分支上文件被删除,在另一个分支上文件被修改.
- sscanf函数用法详解
sscanf() - 从一个字符串中读进与指定格式相符的数据. 函数原型: Int sscanf( string str, string fmt, mixed var1, mixed var2 ... ...
- Block传值
typedef void(^DemoBlock)(); typedef void(^INTBlock)(int a, int b); @property(nonatomic,assign)DemoBl ...
- Nhibernate的介绍
1.介绍的内容 1.感谢园友的文章支持 by 李永京 by wolfy 2.Nhibernate的框架介绍 3.Nhibernate的架构介绍 4.Nhibernate映射方法介绍(该点自己也存在一定 ...
- Common Scenarios to avoid with DataWarehousing
Database Design Rule Description Value Source Problem Description 1 Excessive sorting and RID lookup ...
- 让asp.net和php同时在Linux上跑起来
实现这个想法有很多种方法,我就我最近算是比较熟悉的方式来说给大家吧. 因为有了mono,所以.net才能跨平台,.net都跨平台了,.net平台的童鞋们是不是应该提起精神好好了解下mono呢? 当然了 ...
- 让Sqlite脱离VC++ Runtime独立运行
前段时间在开发OrayTalk(傲瑞通)的聊天记录模块时用到了Sqlite,这是我第一次接触和使用Sqlite,总体感觉还是非常不错的.这里把我使用Sqlite的经验跟大家分享一下. 一.关于Sqli ...
- Bad version number in .class file
TY项目是用JDK1.6做的,早先在电脑上装了一个1.5的,这回就不能用了.为了能用,我就又装了一个1.6的,修改了环境变量之后,以为一切OK.开始测试,首先在Myeclipse中打开我用1.5编的一 ...