从Objective-C到C ++的最好的方法是什么? [英] What is the best way to port from Objective-C to C++?

查看:122
本文介绍了从Objective-C到C ++的最好的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有Objective-C的经验,但有一个强大的C ++背景。有没有自动化的工具/脚本,或者最坏的情况下,一些手动方法使用一些很好的参考端口代码编写Objective-C到C ++?有什么困难涉及?

I have no Objective-C experience whatsoever but have a strong C++ background. Is there an automated tool/script or, worst case, some manual method using some excellent reference to port code written in Objective-C to C++? What are the difficulties involved?

编辑:
我被告知代码使用Objective-C相当简单。这是一个iPhone应用程序,可能不使用太多的方式的OS级别的UI。 C ++版本适用于非Apple平台,其中GNUStep不是一个选项,因此Objective-C ++不是一个选项。

I'm told the code uses Objective-C fairly trivially. It's an iPhone app that probably doesn't use much in the way of OS-level UI. The C++ version is meant for a non-Apple platform where GNUStep is not an option, so Objective-C++ is not an option.

推荐答案

p>我做同样的问题。并且有一些解决方案:

I worked on same problem. And have some solutions:


  • 在2007年,我尝试在Visual Studio中支持Objective-C并编写我自己的ObjC运行时,没有更多的时间为它编写解析器。如果有,您可以:)

  • In 2007 I tried support Objective-C in Visual Studio and write my own ObjC runtime, but I do not have more time for writing parser for it. If you have, you can :)

http ://code.google.com/p/qobjc/

我编写了基于C ++编写的Foundation Framework的基本功能,在这种情况下需要端口手动,你的代码将在C + +,但它会像Objective-C。此图书馆在iPhone上使用。

I write basic functionality of Foundation Framework written on C++, in this case need port manually, your code will be on C++ but it will be like on Objective-C. This library worked on iPhone.

http:/ /code.google.com/p/dcocoa/

这篇关于从Objective-C到C ++的最好的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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