C++ iPhone/Android 上的库:包装类的生成
我有以下问题:
假设我有许多不同的 C++ 库(算法),它们以相同的风格编写。 (他们需要一些输入并返回一些输出)。
我做了一些研究,想问是否可以自动生成 Wrapper 类(通过使用给定 C++ 算法的输入和输出的算法),它可以很容易地在 Objective-C/Java 中使用( iOS/Android)然后。 应用程序编程部分并不真正耗时。
I have the following question:
Let's assume I have many different C++ libraries(algorithms), which are written in the same style . (They need some inputs and give back some outputs).
I've done some research and wanted to ask if its possible to auto-generate Wrapper classes (by using an algorithm which are given the input and the outputs of the c++ algorithm), which can be easily used in Objective-C/Java (iOS/Android) then .
The app-programming part isn't really time-consuming.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要查看SWIG。这会从基于 C 的 API 生成其他语言的绑定。 Objective-C 支持就在那里 Java。
我不确定更高版本中的 Objective-C 支持发生了什么,但它在 v1.1 中,您可以 查看添加它的分支。
You'll want to look at SWIG. This generates bindings for other languages from a C based API. Objective-C support is in there as is Java.
I'm not sure what happened to objective-C support in the later versions, but its in v1.1 and you can see the branch where it was added.