C ++到字节码编译器的Silverlight CLR?

编程入门 行业动态 更新时间:2024-10-26 18:26:28
本文介绍了C ++到字节码编译器的Silverlight CLR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我希望能够编译一个C / C ++库,以便在Silverlight CLR的安全托管运行时中运行。

I'd like to be able to compile a C/C++ library so that it runs within a safe managed runtime in the Silverlight CLR.

有几个工具用于使用JVM允许C ++代码在CRT仿真层中运行(参见 NestedVM , LLJVM 等),这有效地允许C ++代码在Java Applet中运行。甚至还有一个用于Adobe Flash VM的工具(请参见 Alchemy )。

There are several tools for doing this with the JVM that allows C++ code to run within a CRT emulation layer (see NestedVM, LLJVM, etc), which effectively allows C++ code to be run within a Java Applet. There's even a tool for this for the Adobe Flash VM (see Alchemy).

然而,我似乎找不到任何工具像这样的CLR。 fyi,MSVC工具似乎不允许这样: / clr:pure 标志将创建在CLR中运行的C ++代码,但它不安全因为CRT不安全)和 / clr:safe 需要大量的代码更改(无原生类型等)。

However, I can't seem to find any tools like this for the CLR. fyi, the MSVC tools don't seem to allow for this: The /clr:pure flag will create C++ code that runs in the CLR, but it isn't safe (because the CRT isn't safe) and /clr:safe requires massive code changes (no native types, etc).

推荐答案

然后我觉得你很幸运。如果你的代码不能使用/ clr:safe标志,那么它不会被编译成可以在Silverlight中运行的东西。如果C ++正在做一些CLR不允许或不支持的事情,那么就没有直接的办法了。

Then I think you are plain out of luck. If your code can't use the /clr:safe flag then it won't be compilable into something that can run in Silverlight. If the C++ is doing something that the CLR does not allow or support, then there is no way around this directly.

根据代码的作用,你可以执行它在服务器上并通过Web服务从Silverlight调用它?

Depending what your code does, you could possibly execute it on the server and call that from Silverlight via a web service?

更多推荐

C ++到字节码编译器的Silverlight CLR?

本文发布于:2023-11-10 06:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574634.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:编译器   字节   CLR   Silverlight

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!