C ++到字节码编译器的CLR? [英] C++ to bytecode compiler for CLR?
问题描述
我希望能够编译一个C / C ++库,使其在CLR中的受管运行时中运行。有使用JVM执行此操作的几个工具( NestedVM , LLJVM ,等),但我似乎找不到任何CLR。有没有人试过这样做?
I'd like to be able to compile a C/C++ library so that it runs within a managed runtime in the CLR. There are several tools for doing this with the JVM (NestedVM, LLJVM, etc) but I can't seem to find any for the CLR. Has anyone tried doing this?
推荐答案
Microsoft已经提供了这样一个工具Visual Studio。 C ++编译器 cl.exe
接受 / clr
选项,让它生成托管代码而不是本地代码。请参阅MSDN文档 如何:迁移到/ clr / a>有关更改您的原生项目以支持托管代码的信息。
Microsoft already provides such a tool with Visual Studio. The C++ compiler cl.exe
accepts the /clr
option to tell it to generate managed code instead of native code. See the MSDN document How To: Migrate to /clr for information on changing your native project to support managed code.
这篇关于C ++到字节码编译器的CLR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!