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 ...
随机推荐
- Mac上Homebrew的使用 (Homebrew 使 OS X 更完整)
0 Homebrew是啥? “Homebrew installs the stuff you need that Apple didn’t.——Homebrew 使 OS X 更完整”. Homebr ...
- js全局变量和局部变量
<script> var i = 'yuanjianhang'; function myloveName() { alert(i); var i = 'guanxi'; } myloveN ...
- networkx的绘图中文显示方块问题
修改matplotlibrc文件 font.family : sans-serif #打开该选项 font.sans-serif : Microsoft YaHei , Bitstream Vera ...
- Python3学习(3)-高级篇
Python3学习(1)-基础篇 Python3学习(2)-中级篇 Python3学习(3)-高级篇 文件读写 源文件test.txt line1 line2 line3 读取文件内容 f = ope ...
- SVM 简要推导过程
SVM 是一块很大的内容,网上有写得非常精彩的博客.这篇博客目的不是详细阐述每一个理论和细节,而在于在不丢失重要推导步骤的条件下从宏观上把握 SVM 的思路. 1. 问题由来 SVM (支持向量机) ...
- Yaf零基础学习总结3-Hello Yaf
Yaf零基础学习总结3-Hello Yaf 上一次我们已经学习了如何安装yaf了,准备工作做好了之后我们来开始实际的编码了,码农都知道一个经典的语句就是“Hello World”了,今天我们开始入手Y ...
- 如果我用C#来输出99表
题目:参见这个链接,简单点说就是在控制台输出一个99乘方表. 无聊想了个C#版本的解答: private static void Print(int n) { var s = Enumerable.R ...
- [Xamarin] 關於發出Notification 的大小事 (转帖)
關於Anroid 的使用者來說,Notification 是一個非常會看到且用到的功能 他可以提醒使用者甚麼東西需要待處理,像是郵件或是會議的提醒等.. 甚至有些APP ,直接使用Notificati ...
- 用c#开发微信 (6) 微渠道 - 推广渠道管理系统 1 基础架构搭建
我们可以使用微信的“生成带参数二维码接口”和 “用户管理接口”,来实现生成能标识不同推广渠道的二维码,记录分配给不同推广渠道二维码被扫描的信息.这样就可以统计和分析不同推广渠道的推广效果. 本系统使用 ...
- 大熊君说说JS与设计模式之------策略模式Strategy
一,总体概要 1,笔者浅谈 策略模式,又叫算法簇模式,就是定义了不同的算法,并且之间可以互相替换,此模式让算法的变化独立于使用算法的客户. 策略模式和工厂模式有一定的类似,策略模式相对简单容易理解,并 ...