首次在ubuntu下编译c源程序,使用gcc,但是提示如下出错信息:
test.c:1:19: 错误: stdio.h:No such file or directory
test.c:2:23: 错误: sys/types.h:No such file or directory
test.c:3:20: 错误: signal.h:No such file or directory
test.c:4:20: 错误: ourhdr.h:No such file or directory
基本意思就是没有这些文件或者目录,原因就是没有安装库文件,使用如下命令安装解决该问题:
gcc 无法编译问题解决
最新推荐文章于 2022-06-30 23:45:40 发布
在Ubuntu操作系统中初次使用gcc编译C程序时遇到stdio.h等头文件缺失的问题。解决方法是通过运行`sudo apt-get install libc6-dev`安装库文件。完成安装后,编译错误得到解决。
摘要由CSDN通过智能技术生成