简体   繁体   English

IOCCC 程序编译错误

[英]IOCCC Program compiling errors

code: http://www.ioccc.org/1988/phillipps.c How do i run this on Coderunner?代码: http://www.ioccc.org/1988/phillipps.c如何在 Coderunner 上运行它? I've encountered some compiling problems that i can't solve after searching on the internet.Can someone help me out?我遇到了一些在网上搜索后无法解决的编译问题。有人可以帮助我吗?

If I am not being informative enough, i'm sorry, but please tell me how i can do better at asking these tech questions.如果我没有提供足够的信息,我很抱歉,但请告诉我如何才能更好地提出这些技术问题。

compiling errors below(i use coderunner)下面的编译错误(我使用coderunner)

在此处输入图像描述

The program is written in an old dialect of C and is relying on some features now considered broken.该程序是用 C 的旧方言编写的,并且依赖于一些现在被认为已损坏的功能。 Clang (the compiler in question) is not happy about the third argument of main and I don't think you can convince it to accept that. Clang(有问题的编译器)对 main 的第三个参数不满意,我认为您无法说服它接受这一点。

You can either install gcc, that compiler will accept the code with just warnings.您可以安装 gcc,该编译器将接受带有警告的代码。 But I don't think coderunner has gcc integration.但我认为 coderunner 没有 gcc 集成。

Or you can manually unscrew the objectionable bit of the code.或者您可以手动拧下代码中令人反感的部分。

Replace all instances of the word main with mayn in the code and add this bit of code to the beginning of the file:将代码中单词main的所有实例替换为mayn并将这段代码添加到文件的开头:

main() {
    mayn(1,0,0);
}

Now you can enjoy the program under clang/coderunner as well.现在您也可以享受 clang/coderunner 下的程序了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM