【问题标题】:_stdio.h: No such file or directory_stdio.h: 没有那个文件或目录
【发布时间】:2022-11-28 10:57:42
【问题描述】:

`

gcc *.c
In file included from get_next_line.h:16,
                 from get_next_line.c:13:
/usr/local/Cellar/gcc/12.2.0/lib/gcc/current/gcc/x86_64-apple-darwin20/12/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
   78 | #include <_stdio.h>
      |          ^~~~~~~~~~
compilation terminated.

`

您好,当我尝试在 MAC 操作系统上编译时遇到了一个问题(我刚刚将其更新为 Ventura),好像我的库的路径不再是好路径,请提供任何帮助?

【问题讨论】:

  • 你是如何安装 GCC 的?是否安装了系统开发环境?
  • Homebrew/homebrew-core 上有一个相关问题:macOS 13 (Ventura) and gcc-12。从那里的讨论来看,您似乎必须安装Xcode 的命令行工具.

标签: c macos gcc compilation


【解决方案1】:

你有一个类型错误(没有下划线作为第一个字符),正确的行:

#include <stdio.h>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-18
    • 2021-05-02
    • 2021-04-22
    • 2015-11-24
    • 2022-12-07
    • 2022-12-20
    相关资源
    最近更新 更多