Any C/C++ to non-native bytecode compiler/interpreters?

不羁的心 提交于 2019-12-22 03:57:18

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/2576004/any-c-c-to-non-native-bytecode-compiler-interpreters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!