开发者

Compile C++ online in a Rails Application

I am looking for a compiler to compile C++ source code in a rails application. My idea is to get the source code as input, compile it and give the output back to the browser. Of course it should be secure and not really forwarded to the system C++ compiler. Is there 开发者_StackOverflow社区maybe a ruby library which already do this job?

Best regards, Fabian


The problem is not the compiler. You're problem is safely executing the code, which is VERY (yes, caps and bold) hard with something as low as C/C++.

In fact, it's almost impossible, your best bet would be a complete sandbox in which the code is going to be executed. There is no ruby library for this AFAIK, and I highly doubt there ever will be one.


I will try the API[1] of ideone.com

[1] http://ideone.com/api

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜