本文介绍了Windows的Objective C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows平台上编写Objective-C的最好方法是什么?

What would be the best way to write Objective-C on the Windows platform?

Cygwin和gcc?是否有某种方式我可以以某种方式将它集成到Visual Studio?

Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio?

沿着这些线 - 有任何建议,如何链接和使用Windows SDK的东西这个。它是一个不同的野兽,但我知道我可以编写的装配和链接在Windows DLL中给我无障碍的这些电话,但我不知道如何做,不用googling和得到零碎的方向。

Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions.

有人知道一个好的在线或书籍资源做或解释这些事情吗?

Is anyone aware of a good online or book resource to do or explain these kinds of things?

推荐答案

对于前两个答案,如果你只是想要Objective-C,但不是任何Cocoa框架,那么gcc将在任何平台上工作。你可以通过Cygwin使用它或获取MinGW。但是,如果你想要Cocoa框架,或者至少是一个合理的子集,那么GNUStep和Cocotron是你最好的投注。

Expanding on the two previous answers, if you just want Objective-C but not any of the Cocoa frameworks, then gcc will work on any platform. You can use it through Cygwin or get MinGW. However, if you want the Cocoa frameworks, or at least a reasonable subset of them, then GNUStep and Cocotron are your best bets.

Cocotron实现了很多东西,GNUStep没有,如CoreGraphics和CoreData,虽然我不能保证在一个特定的框架上如何完成他们的实现。他们的目的是保持Cocotron的最新版本的OS X,以便任何可行的OS X程序可以在Windows上运行。因为GNUStep通常使用最新版本的gcc,他们还添加了对Objective-C ++和很多Objective-C 2.0特性的支持。

Cocotron implements a lot of stuff that GNUStep does not, such as CoreGraphics and CoreData, though I can't vouch for how complete their implementation is on a specific framework. Their aim is to keep Cocotron up to date with the latest version of OS X so that any viable OS X program can run on Windows. Because GNUStep typically uses the latest version of gcc, they also add in support for Objective-C++ and a lot of the Objective-C 2.0 features.

我没有测试这些功能与GNUStep,但如果您使用足够新的版本的gcc,您可以使用它们。我几年前不能使用Objective-C + + GNUStep。然而,GNUStep从几乎任何平台编译。 Cocotron是一个非常mac为中心的项目。虽然可能在其他平台上编译它,但它提供了XCode项目文件,而不是makefile,所以你只能在OS X上编译它的框架。它还带有在XCode上编译Windows应用程序的说明,但不是任何其他平台。基本上,它可能为Cocotron设置一个Windows开发环境,但它不像为GNUStep设置一样简单,你会自己,所以GNUStep是绝对的方式去,如果你在开发Windows而不是Windows。

I haven't tested those features with GNUStep, but if you use a sufficiently new version of gcc, you might be able to use them. I was not able to use Objective-C++ with GNUStep a few years ago. However, GNUStep does compile from just about any platform. Cocotron is a very mac-centric project. Although it is probably possible to compile it on other platforms, it comes XCode project files, not makefiles, so you can only compile its frameworks out of the box on OS X. It also comes with instructions on compiling Windows apps on XCode, but not any other platform. Basically, it's probably possible to set up a Windows development environment for Cocotron, but it's not as easy as setting one up for GNUStep, and you'll be on your own, so GNUStep is definitely the way to go if you're developing on Windows as opposed to just for Windows.

对于有价值的,Cocotron是根据MIT许可证授权的,而GNUStep是根据LGPL授权的。

For what it's worth, Cocotron is licensed under the MIT license, and GNUStep is licensed under the LGPL.

这篇关于Windows的Objective C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:24