簡體   English   中英

未找到 string.h 文件

[英]string.h file not found

#include <string.h> 

Clang 沒有找到string.h 然后我給它一個更好的路徑,但沒有找到另一個文件:

[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]           ^~~~~~~~~~~~~~~~~~~~~~~~~~

我該怎么辦?

我可以為我的“llvm”環境下載string.h並將其粘貼到那里嗎?:

/usr/include/llvm-10/llvm

如果您在 ubuntu 系統上,並且以后遇到此類問題,您可以通過鍵入以下命令找到答案:

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

然后使用apt-get install xxx下載對應的庫文件。 如果是red hat系統或者其他,應該有類似的命令。
在此處輸入圖片說明

找不到 String.h 但為什么

好的,這里只是壞線的圖片。 那里發生了什么事。 我正在使用 clang 和這個 clangd。 為什么它不能找到正確的庫 xD

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM