【发布时间】:2022-11-14 18:17:13
【问题描述】:
我正在使用 Linux。我通过存储库安装了 Clang 编译器和 Musl 标准 C 库。我尝试使用 Musl stdio.h 通过 Clang 编译一个“hello world”程序,但它失败了。
I put the following line at the beginning of the program:
#include </usr/include/x86_64-linux-musl/stdio.h>
But at the compiling time (in verbose mode) it returned the following error:
==============================
(...)
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/llvm-11/lib/clang/11.0.1/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
In file included from /home/pureos/hello.c:1:
/usr/include/x86_64-linux-musl/stdio.h:26:10: error: 'bits/alltypes.h' file not found with <angled> include; use "quotes" instead
#include <bits/alltypes.h>
^~~~~~~~~~~~~~~~~
"bits/alltypes.h"
==============================
It appears that it doesn't recognize the "bits" directory inside the "x86_64-linux-musl" directory, but I saw that it DOES exist.
Any help is welcome, regards.
【问题讨论】: