简体   繁体   English

未找到 string.h 文件

[英]string.h file not found

#include <string.h> 

Clang doesn't find string.h . Clang 没有找到string.h Then I give it a better path but another file is not found:然后我给它一个更好的路径,但没有找到另一个文件:

[build] /usr/include/string.h:26:10: fatal error: bits/libc-header-start.h: No such file or directory
[build]  #include <bits/libc-header-start.h>
[build]           ^~~~~~~~~~~~~~~~~~~~~~~~~~

What should I do?我该怎么办?

Can I just download string.h for my "llvm" environment and paste it there?:我可以为我的“llvm”环境下载string.h并将其粘贴到那里吗?:

/usr/include/llvm-10/llvm

If you are on an ubuntu system and encounter such problems in the future, you can find the answer by typing this command:如果您在 ubuntu 系统上,并且以后遇到此类问题,您可以通过键入以下命令找到答案:

apt-file search bits/libc-header-start.h

Then download the corresponding library file using apt-get install xxx .然后使用apt-get install xxx下载对应的库文件。 If it is a red hat system or other, there should be similar commands.如果是red hat系统或者其他,应该有类似的命令。
在此处输入图片说明

String.h not found but why找不到 String.h 但为什么

Ok here is just a picture of the bad line.好的,这里只是坏线的图片。 What is going on there.那里发生了什么事。 I am using clang and this clangd.我正在使用 clang 和这个 clangd。 Why can't it just find the correct library xD为什么它不能找到正确的库 xD

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM