ubuntu 编译C++ error: ‘syscall’ was not declared in this scope

明明已经加了头文件ubuntu

#include <sys/syscall.h>
#include <sched.h>
#include <sys/resource.h>

 

编译仍是报错this

error: ‘syscall’ was not declared in this scopespa

参考https://blog.csdn.net/kl222/article/details/17025367.net

ubuntu中syscall定义是放在头文件unistd.h中的。code

再添加头文件unistd.h便可blog

#include <unistd.h> get

编译ok.编译

相关文章
相关标签/搜索