在运行时编译c#中的cpp代码 [英] compile cpp code in c# in run time

查看:77
本文介绍了在运行时编译c#中的cpp代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在c#中编译c ++代码,我程序的用户有丰富的文本框,他必须在c中写一个结构。我想编译这段代码,看看他是否有错误。我尝试了很多找到的方法

I want to compile code of c++ in c#, the user of my program has rich text box that he has to write there a struct in c. and I want to compile this code to see if he has error. I tryd a lot of ways that I find

推荐答案

你需要提供或编写一个C ++编译器,并且(可能)在传递之前将结构包装在一个简单的文件中结束了。提供可能是一个问题,因为你需要小心版权问题 - 你不能只是分发编译器,如糖果! :笑:



另一种解决方案是使用互联网C ++编译服务之一 - 谷歌可能会有所帮助: https://www.google.co.uk/search?q=C%2B%2B+compile+on+internet&aq=f&oq=C%2B%2B+compile+on+internet&sourceid= chrome& ie = UTF-8 [ ^ ]但我从未尝试过任何他们所以我不知道它会有多复杂。
You will need to supply or write a C++ compiler, and (probably) package the struct in a simple file before passing it over. Supplying may be a problem since you will need to be careful of copyright problems - you cannot just "hand out" compilers like sweeties! :laugh:

The other solution is to use one of the internet C++ compilation services - google may be of help here: https://www.google.co.uk/search?q=C%2B%2B+compile+on+internet&aq=f&oq=C%2B%2B+compile+on+internet&sourceid=chrome&ie=UTF-8[^] but I''ve never tried any of them so I have no idea how complex it would be.


这篇关于在运行时编译c#中的cpp代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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