在Solaris中,GCC编译Solaris中的getopt隐式声明?
#include <unistd.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
getopt(1,argv,"");
return 0;
}
的man page为getopt的时候给我的函数'getopt的”
的
隐含的声明说,有关包括unistd.h中或标准输入输出。小时,但是即使我包括两个我仍然得到这个警告。这是正常的吗?使用的是Unix开发中没有明确声明的函数吗?
你是如何编译它的? – 2009-12-13 22:39:41
我在用gcc -ansi -pedantic -Wall编译 – Steven 2009-12-13 22:49:16
@Steven“grep getopt /usr/include/*.h”返回什么? – Scooter 2012-08-18 05:04:33