deepin 下 fatal error: sys/cdefs.h: 没有那个文件或目录

Greatljc 2019-07-05 11:39:44
在deepin下做csapp的第一个lab,datalab, 根据那个说明,然后我输入命令make btest,然后就有一堆错误
make btest
gcc -O -Wall -m32 -lm -o btest bits.c btest.c decl.c tests.c
In file included from /usr/include/stdio.h:27:0,
from btest.c:16:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: 没有那个文件或目录
# include <sys/cdefs.h>
^
compilation terminated.
In file included from /usr/include/stdio.h:27:0,
from decl.c:1:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: 没有那个文件或目录
# include <sys/cdefs.h>
^
compilation terminated.
In file included from /usr/include/limits.h:25:0,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:168,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/syslimits.h:7,
from /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed/limits.h:34,
from tests.c:3:
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: 没有那个文件或目录
# include <sys/cdefs.h>
^
compilation terminated.
Makefile:11: recipe for target 'btest' failed
make: *** [btest] Error 1


第一个lab的说明是这样的
To compile and run the btest program, type:

unix> make btest
unix> ./btest [optional cmd line args]

You will need to recompile btest each time you change your bits.c
program. When moving from one platform to another, you will want to
get rid of the old version of btest and generate a new one. Use the
commands:
...全文
827 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

18,777

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧