我需要一个真正的C#本机编译器 [英] I need a real C# native compiler

查看:138
本文介绍了我需要一个真正的C#本机编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



有没有人知道任何C#原生编译器?



我读到关于ngen .exe但它仍然需要.Net Framework ...没用。



每个人都需要一个真正的C#原生编译器



帮助!



非常感谢

解决方案

AFAIK没有这样的动物。自从(微软孕育)诞生以来,C#已经与.NET(也是微软孕育的)紧密集成,从而与CLR紧密结合。我不得不说没有.NET的C#会是一种较差的体验,因为故意缺少全局变量以及对IEnumerable接口和垃圾收集器的绝对要求意味着它将是一个没有它们的残废野兽。



如果你想要原生,学习C ++。



如果你想要C#,学习.NET


< blockquote>你为什么需要这样的东西? C#被设计用于生成在.NET框架中运行的托管代码,而不是本机代码。


我相信你确实有一点 - 有时候有一个可执行文件很好。我相信有一些迹象表明单声道人员 [ ^ ]正在玩弄这个想法 - 但它可能没有为黄金时间做好准备:)需要iPhone部署 - 不知道是否该功能将可用于其他平台...



您可能会发现Delphi XE正是您所需要的 - 您必须学习对象pascal,但我猜测你会发现有很多相似之处,因为它们都受到Anders Hejlsberg的严重影响。

http: //www.embarcadero.com/products/delphi [ ^ ]



问候

Espen Harlinn


Hello people,

Does anyone know any C# native compiler?

I read about ngen.exe BUT it still needs the .Net Framework... useless.

Everybody needs a REAL C# native compiler

Help!

Thanks a lot

解决方案

AFAIK there is no such animal. Since it's (Microsoft gestated) birth, C# has been closely integrated with .NET (also Microsoft gestated) and thus to CLR. I have to say that C# without .NET would be a poorer experience, since the deliberate lack of globals and the absolute requirement for both IEnumerable interfaces and the Garbage Collector mean it would be a crippled beast without them.

If you want native, learn C++.

If you want C#, learn .NET


Why would you need such a thing? C# has been designed to generate managed code whic runs in the .NET framework, not native code.


I believe you do have a point - sometimes it's nice to have a single executable. I believe there is some indication that the mono folks[^] are toying with the idea - but it's probably not ready for "prime time" :) Needed for iPhone deployment - don't know if the functionality will be available for other platforms ...

You may find that Delphi XE is just what you need - you'll have to learn object pascal, but I guess you will find that there is a lot of similarities as both are heavily influenced by Anders Hejlsberg.
http://www.embarcadero.com/products/delphi[^]

Regards
Espen Harlinn


这篇关于我需要一个真正的C#本机编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆