Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C 叮当声错误-找不到stddef文件?_C_Linux_Ubuntu_Clang_Stdio - Fatal编程技术网

C 叮当声错误-找不到stddef文件?

C 叮当声错误-找不到stddef文件?,c,linux,ubuntu,clang,stdio,C,Linux,Ubuntu,Clang,Stdio,升级到Ubuntu13.10“Saucy”后,Clang现在给我错误信息: clang -Wall -Werror -std=c99 -ggdb -O0 5.1.c -o 5.1 In file included from 5.1.c:1: /usr/include/stdio.h:33:11: fatal error: 'stddef.h' file not found # include <stddef.h> ^ 1 error generated. make

升级到Ubuntu13.10“Saucy”后,Clang现在给我错误信息:

clang -Wall -Werror -std=c99 -ggdb -O0 5.1.c -o 5.1
In file included from 5.1.c:1:
/usr/include/stdio.h:33:11: fatal error: 'stddef.h' file not found
# include <stddef.h>
          ^
1 error generated.
make: *** [5.1] Error 1
clang-Wall-Werror-std=c99-ggdb-o05.1.c-o5.1
在5.1.c中包含的文件中:1:
/usr/include/stdio.h:33:11:致命错误:未找到“stddef.h”文件
#包括
^
生成1个错误。
制造:**[5.1]错误1

顺便说一句,我包含的标题是
stdio.h
而不是
stddef.h
,但我假设
stdio.h
引用或
#包含
stddef.h
这是ubuntu中的一个已知错误。请看这里:

临时解决方法似乎是更正符号链接:

对于3.5 LLVM工具链,符号链接 /usr/lib/clang/3.5/include错误地指向 ../../llvm-3.4/lib/clang/3.5/include,但应指向 ../../llvm-3.5/lib/clang/3.5/include

解决方法(当然)是手动更正符号链接

对于3.4工具链,/usr/lib/clang/3.4/include不存在于 全部的我还没有在Ubuntu上尝试LLVM3.4,所以我不知道是否创建 指向.././llvm-3.4/lib/clang/3.4/include的符号链接将修复 这是个问题,但看起来确实有可能


在未安装
clang
的情况下尝试运行
clang-tidy
时,出现此错误


安装clang修复了此错误。在我看来,当
clang-tidy
在GCC和系统路径中查找头并且这些头的
clang
version/symlink丢失时,就会发生此错误。

我在运行
clang-tidy
时也遇到此错误。谢谢你的解决方案。