gpt4 book ai didi

找不到位/mathcalls.h

转载 作者:太空宇宙 更新时间:2023-11-04 08:45:48 25 4
gpt4 key购买 nike

您好,我试图创建 C 可执行文件,但我似乎无法找到“bits/mathcalls.h”。

$ make

45) cannot find include file "bits/mathcalls.h"
not in /usr/include/linux/bits/mathcalls.h
not in include/bits/mathcalls.h
not in /usr/include/bits/mathcalls.h

但是使用查找

$ sudo find / -name 'mathcalls.h'
/usr/include/mathcalls.h
/usr/include/i386-linux-gnu/bits/mathcalls.h

所以它确实存在,但不在“make”正在寻找的任何位置。我如何添加这些路径以便“make”在我实际拥有它们的地方寻找它们?

非常感谢

最佳答案

你不应该直接包含 bits/mathcalls.h。您应该始终只包含 math.h,然后它将包含适合您的目标操作系统/体系结构的正确 mathcalls.h。事实上,如果您打开并阅读您拥有的任何 mathcalls.h header ,它们将在前几行中包含类似

的内容
#ifndef _MATH_H
# error "Never include <bits/mathcalls.h> directly; include <math.h> instead."
#endif

如果您实际上尝试在没有 math.h 的情况下包含它们,这将引发错误。

关于找不到位/mathcalls.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21732489/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com