- 论坛徽章:
- 0
|
HP: 函数res_init()在哪里定义的?
是呀!
我也就觉得纳闷,很奇怪,SunOS上就没有这个怪问题,?
真郁闷〉。不信可以试试:
/*file name : test.c*/
#include <resolv.h>;
#include <stdio.h>;
extern struct __res_state _res;
int main()
{
res_init();
printf("domain name P:%s\n", _res.defdname);
}
cc test.c -o test
一切OK!
但是:
/*file name : test.C/
#include <resolv.h>;
#include <stdio.h>;
extern struct __res_state _res;
int main()
{
res_init();
printf("domain name P:%s\n", _res.defdname);
}
aCC test.C -o test
就会出现以下信息:
Error 328: "test.C", line # Function 'res_init' has not been defined yet; cannot call.
res_init();
谁知道为什么?? |
|