当前位置: 技术问答>linux和unix
ubuntu 9.10增加系统调用后测试函数错误的问题
来源: 互联网 发布时间:2016-08-13
本文导语: #include #include #include #include int main(int argc,char*argv[]) { int i = syscall(337,argv[1],argv[2]); if(i==-2) printf("error opening infilen"); if(i==-3) printf("error opening outfilen"); if(i==-4) printf("error reading filen"); if(i==-5) printf("error writing filen...
#include
#include
#include
#include
int main(int argc,char*argv[])
{
int i = syscall(337,argv[1],argv[2]);
if(i==-2)
printf("error opening infilen");
if(i==-3)
printf("error opening outfilen");
if(i==-4)
printf("error reading filen");
if(i==-5)
printf("error writing filen");
if(i==0)
printf("finished!n");
return(0);
}
错误信息:
./1.c: In function ‘int main(int, char**)’:
./1.c:8: error: ‘syscall’ was not declared in this scope
#include
#include
#include
int main(int argc,char*argv[])
{
int i = syscall(337,argv[1],argv[2]);
if(i==-2)
printf("error opening infilen");
if(i==-3)
printf("error opening outfilen");
if(i==-4)
printf("error reading filen");
if(i==-5)
printf("error writing filen");
if(i==0)
printf("finished!n");
return(0);
}
错误信息:
./1.c: In function ‘int main(int, char**)’:
./1.c:8: error: ‘syscall’ was not declared in this scope
|
一般都用GCC编译器
|
恭喜。。。。。。。。。
|
那楼主一开始用的什么编译器呀
|
同上,楼主开始用的什么编译器啊,