windows 和 gcc 上的目标 c [英] objective c on windows and gcc

查看:67
本文介绍了windows 和 gcc 上的目标 c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

windows 的 gnu 目标 c 编译器是否与 Mac OS X(和 Ipad)的编译器相同?

Is the gnu objective c compiler for windows the same as the compiler for Mac OS X (and Ipad)?

我想在 Windows 上编写一些代码并在 mac 和 ipad 上运行它,目标 C 似乎是 Mac/Ipad 的最佳方式,但 gnu 编译器是否相同?我知道 cocoa 等库不可用,但这不是问题,我们将为每个平台编写不同的界面代码(请不要评论这不是正确的方法等).

I want to write some code on windows and run it on the mac and ipad, objective C seems to be the best way to go for the Mac/Ipad but is the gnu compiler the same? I know the libraries cocoa etc are not available but this is not an issue we'll be writing different interface code for each platform (please no comments about this is not the right way etc).

蒂亚,戴夫

推荐答案

编译器大致相同,但运行时系统不同.如果您不使用 Objective-C 2.0 的新功能,您的代码应该可以在两个运行时系统中正常工作.如果要使用新功能,则必须使用不同的运行时.您可以在此处在 GNUstepWiki 上找到更多信息.

The compiler is more or less the same, but the runtime systems are different. If you don’t use the new features from Objective-C 2.0 your code should work fine with both runtime systems. If you want to use the new features you have to use a different runtime. You can find more information here on the GNUstepWiki.

但是您仍然需要一个框架来提供基本对象,例如字符串、数组、字典等.您可以使用 The Cocotron 中的这一部分,该框架试图使所有 Cocoa 在 Windows、Linux 和其他平台.

But you still need a framework that provides basic objects like strings, arrays, dictionaries and so on. You could use this part from The Cocotron, a framework that tries to make all of Cocoa available on Windows, Linux and other platforms.

这篇关于windows 和 gcc 上的目标 c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆