编译适用于Linux的Objective-C应用程序(API coverage) [英] Compiling Objective-C app for Linux (API coverage)

查看:181
本文介绍了编译适用于Linux的Objective-C应用程序(API coverage)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能会在这里问一些奇怪的东西,但我不知道从哪里开始。事情是,我正在考虑在Mac上使用Obj-C和Foundation类编写一个命令行工具。



但是有一个很大的风险,我想能够编译它为不同的Linux发行版作为服务器应用程序在未来运行。



我理解这不是一个问题本身编译Objective-C对于Linux,但是我不明白是API的覆盖。



由于我已经了解到目前为止,我可以使用GNUStep编译linux,但有一个好的方法让我获得API覆盖的概述?我的意思是,如果我使用一个类已经添加到基础框架在OSX狮子让我们说,当时在GNUStep不可用的风险有多大?



我希望我问一个你可以理解的问题,基本上我想避免编写一个理论上可以为linux编译的应用程序,但实际上不是因为缺少类等。



谢谢!

解决方案

您应该可以检查您使用的API请参阅 GNUStep基本API文档。 p>

如果兼容性是一个大问题,您可能希望将GNUStep作为基础。编译mac应该是相当微不足道,相比,移动代码的方式。当然,你总是可以选择帮助补充GNUStep中缺失的任何东西。


I might be asking something strange here, but I'm unsure where to begin. The thing is that I am considering writing a command line tool on a Mac using Obj-C and the Foundation classes.

But there is a very big risk that I would like to be able to compile it for different Linux distributions to run as a server app in the future.

I understand that it is not a problem in itself to compile Objective-C for Linux, but what I don't understand is the API coverage.

As I have understood it so far I can use GNUStep to compile for linux, but is there a good way for me to get an overview of the API coverage? What I mean is, if I use a class that has been added to the Foundation framework in OSX Lion lets say, how big is the risk of that not being available in GNUStep at that time?

I hope I am asking a question that you guys can understand, basically I want to avoid writing an app that can theoretically be compiled for linux, but not in practice because of missing classes etc.

Thanks!

解决方案

You should be able to check if the API's you're using are available by consulting the GNUStep base API docs.

You may want to target GNUStep as your base if compatibillity is a big concern. Compiling for mac should then be rather trivial, compared to moving the code the other way. Of course you always have the option of helping inplement whatever is missing from GNUStep too.

这篇关于编译适用于Linux的Objective-C应用程序(API coverage)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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