What does “Failed to zip binaries” mean?

与世无争的帅哥 提交于 2019-12-13 01:24:42

问题


I have successfully compiled my code, but it says this:

Note: You can also run your application by typing 'run' followed by any command line arguments.
Starting application without args...
Checking Libraries...
Copying files...
Processing Files...
Compiling...
Failed to zip binaries!

Application Exited.

I want my code to have the user enter three numbers, with spaces in between, and have them be multiplied, so here is my code:

#include <stdio.h>
#include <stdlib.h>

int mult( int x, int y, int z) {
    return x * y * z;

int main()
    {
    int x;
    int y;
    int z;

    printf("Input two integers to be multiplied: ");
    scanf("%d", &x);
    scanf("%d", &y);
    scanf("%d", &z);
    printf("The product of the three numbers is %d\n", mult( x, y, z) );
    getchar();
}

int mult (int x, int y, int z)
{
return x * y * z;
    }
}        

I am using compilr.com as my development platform.


回答1:


Your code contains syntax errors. mult is defined twice, and there are problems with braces. Besides, if you are using C89, main should return a value.




回答2:


Besides that your code is somewhat weird and probably wrong, it seems to me that your error indicates a linker problem: http://ideone.com/iBOtP




回答3:


In fact, your code will simply not link. Your first definition of mult is missing a brace at the end. Your second (unnecessary) definition seems to have an extra brace following it. As such, there seems to be a single big mult method and no main at all, resulting in the linker error. The main (even if not caught within the braces) doesn't return anything either.

Surprisingly, Compilr doesn't seem to return any errors with regards to this. (Or you don't show us) However, as a consequence of the failure to link, there are no binaries. So when trying to zip them, the actual compression fails with the error message you see.

I would seriously recommend to you to pick up a decent compiler/IDE to compile your code yourself before submitting it anywhere else. Make sure it actually works on your local system first. If compilr.com doesn't return any actual syntax/compiler/linker error information, then it's next to useless for you. (Note that I'm unfamiliar with the system, so it might actually provide it to you. If so, figure out how this works).



来源:https://stackoverflow.com/questions/12661775/what-does-failed-to-zip-binaries-mean

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!