博客
关于我
为什么/usr/include/linux/stddef.h是空的?
阅读量:397 次
发布时间:2019-03-05

本文共 474 字,大约阅读时间需要 1 分钟。

文章目录

1.首先可以测试OS是否有stddef.h头文件?

  • 单独编译头文件
gcc -E - <<<'#include
' | grep stddef.h或者gcc -E - <<<"#include
" | grep stddef.h
  • 通常情况下C库的头文件在/usr/lib/中,在ubuntu15.04上/usr/include/linux/stddef.h是空的,在Centos上,是有内容的,内容如下:
#ifndef _LINUX_STDDEF_H#define _LINUX_STDDEF_H#undef NULL#if defined(__cplusplus)#define NULL 0#else#define NULL ((void *)0)#endif#endif
  • 要么就是Makefile文件导致的
    删除Makefile文件中的nostdinc选项
  • 结论:一般不用去关系这个问题,肯定是其它报错引起的

2.查看gcc编译器默认支持的c语言标准

gcc -E -dM - 
  • 参考:

转载地址:http://qufzz.baihongyu.com/

你可能感兴趣的文章
MySQL启动失败:Can't start server: Bind on TCP/IP port
查看>>
mysql启动报错
查看>>
mysql启动报错The server quit without updating PID file几种解决办法
查看>>
MySQL命令行登陆,远程登陆MySQL
查看>>
mysql命令:set sql_log_bin=on/off
查看>>
mySQL和Hive的区别
查看>>
MySQL和Java数据类型对应
查看>>
mysql和oorcale日期区间查询【含左右区间问题】
查看>>
MYSQL和ORACLE的一些操作区别
查看>>
mysql和redis之间互相备份
查看>>
MySQL和SQL入门
查看>>
mysql在centos下用命令批量导入报错_Variable ‘character_set_client‘ can‘t be set to the value of ‘---linux工作笔记042
查看>>
Mysql在Linux运行时新增配置文件提示:World-wrirable config file ‘/etc/mysql/conf.d/my.cnf‘ is ignored 权限过高导致
查看>>
Mysql在Windows上离线安装与配置
查看>>
MySQL在渗透测试中的应用
查看>>
Mysql在离线安装时启动失败:mysql服务无法启动,服务没有报告任何错误
查看>>
Mysql在离线安装时提示:error: Found option without preceding group in config file
查看>>
MySQL基于SSL的主从复制
查看>>
Mysql基本操作
查看>>
mysql基本操作
查看>>