开发者

Compiling C++ for the JVM

开发者 https://www.devze.com 2023-01-26 08:36 出处:网络
When compiling C++ you of course use a compiler for the target platform you want to compile for. Is there a C++ compiler that targets the JVM (so instead of using the Java \"开发者_StackOverflow中文版

When compiling C++ you of course use a compiler for the target platform you want to compile for. Is there a C++ compiler that targets the JVM (so instead of using the Java "开发者_StackOverflow中文版native" interface C++ code is compiled to Java byte code)?


NestedVM provides binary translation for Java Bytecode. This is done by having GCC compile to a MIPS binary which is then translated to a Java class file. Hence any application written in C, C++, Fortran, or any other language supported by GCC can be run in 100% pure Java with no source changes.


As I have answerd on this similar SO question there is a new kid in town called gcc-bridge. It's a maven plugin and supports all the gnu laguages like c, c++, fortran.

0

精彩评论

暂无评论...
验证码 换一张
取 消