Can C/C++ software be compiled into bytecode for later execution? (Architecture independent unix software.)

前端 未结 6 913
失恋的感觉
失恋的感觉 2021-02-04 17:34

I would want to compile existing software into presentation that can later be run on different architectures (and OS).

For that I need a (byte)code that can be easily ru

6条回答
  •  清歌不尽
    2021-02-04 17:51

    As Ankur mentions, C++/CLI may be a solution. You can use Mono to run it on Linux, as long as it has no native bits. But unless you already have a code base you are trying to port at minimal cost, maybe using it would be counter productive. If it makes sense in your situation, you should go with Java or C#.

    Most people who go with C++ do it for performance reasons, but unless you play with very low level stuff, you'll be done coding earlier in a higher level language. This in turn gives you the time to optimize so that by the time you would have been done in C++, you'll have an even faster version in whatever higher level language you choose to use.

提交回复
热议问题