我这里有一些代码可以调用 minizip(),这是 minizip 程序的一个脏重命名的样板 main(),但是当我编译时,我得到 *undefined reference to `minizip(int, char**)*。这是代码。
int minizip(int argc, char* argv[]);
void zipFiles(void)
{
char arg0[] = "BBG";
char arg1[] = "-0";
char arg2[] = "out.zip";
char arg3[] = "server.cs";
char* argv[] = {&arg0[0], &arg1[0], &arg2[0], &arg3[0], 0};
int argc = (int)(sizeof(argv) / sizeof(argv[0])) - 1;
minizip(argc, argv);
}
int minizip(argc,argv)
int argc;
char *argv[];
{
...
}