当前位置:网站首页>gcc 编译报错

gcc 编译报错

2022-07-07 10:26:00 qq_38781075

报错信息

error: ‘S_IRWXU’ undeclared (first use in this function)
error: ‘S_IXGRP’ undeclared (first use in this function); did you mean ‘S_IRGRP’?
error: ‘S_IXOTH’ undeclared (first use in this function); did you mean ‘S_IROTH’?
error: ‘S_IROTH’ undeclared (first use in this function); did you mean ‘S_IRGRP’?
error: ‘S_IFSOCK’ undeclared (first use in this function); did you mean ‘S_IFDIR’?
error: ‘S_IFIFO’ undeclared (first use in this function); did you mean ‘S_IFMT’?
error: ‘S_IFMT’ undeclared (first use in this function); did you mean ‘__PMT’?

解决办法

头文件加上 

#include <sys/stat.h>

原网站

版权声明
本文为[qq_38781075]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_38781075/article/details/125647841