任何 C/C++非本机字节码编译器/解释器?
正如标题所示,是否有 C/C++ 字节码编译器/解释器?我正在用解释性语言编写一个应用程序,该应用程序依赖于某些完全可交叉编译的库(没有特殊标志来指示特定平台编译期间的代码更改),但用 C 和 C++ 编写。与其为每个平台提供 n 个特定于平台的库,不如提供一组由一个特定于平台的解释器解释的库。
可能和/或可用吗?
编辑1: 所讨论的解释语言是 Python,尽管我也可能使用 Ruby。
As the title indicates, are there any C/C++ bytecode compilers/interpreters? I'm writing an application in an interpreted language that depends on certain libraries that are fully cross-compilable (there are no special flags to indicate code changes during compilation for a certain platform) but are written in C and C++. Rather than shipping n-platform-specific-libs with each platform, it would be nice to ship one set of libs which are interpreted by one platform specific interpreter.
Possible and/or available?
EDIT1:
The interpreted language in question is Python, though I may also use Ruby.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用哪种解释语言?如果它有基于 .NET 的实现(例如 IronPython),您可以将它与 C++/CLI 编译器一起使用,为 .NET CLR 和 Mono 生成字节代码。
仅当您完全控制 C++ 库时,这才可能可行。
Which interpreted language are you using? If it has a .NET based implementation (e.g. IronPython) you could possibly use it with the C++/CLI compiler to produce byte code for the .NET CLR and Mono.
This is only likely to be feasible if you have full control over your C++ libraries.
如果您不确定是否使用 .NET VM/CLR,那么您可以使用 LLJVM(通过 llvm-gcc)和 Jython 或 JRuby。
If you are not sure about using the .NET VM/CLR, then you could give the Java VM a try with LLJVM (via llvm-gcc) and either Jython or JRuby.