【gcc】【darwin】头文件缺失
  • 板块灌水区
  • 楼主ForkΨKillet
  • 当前回复5
  • 已保存回复5
  • 发布时间2020/9/25 17:59
  • 上次更新2023/11/5 12:38:58
查看原帖
【gcc】【darwin】头文件缺失
125210
ForkΨKillet楼主2020/9/25 17:59

gcc -v:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Volumes/FORKUB/Safety/bin/../libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper
Target: x86_64-apple-darwin19
Configured with: ...
Thread model: posix
gcc version 9.2.0 (GCC) 

OS: macOS(darwin)
用不了 homebrew,只有命令行,#include <iostream> 时报错

In file included from ~/include/c++/9.2.0/bits/postypes.h:40,
                 from ~/include/c++/9.2.0/iosfwd:40,
                 from ~/include/c++/9.2.0/ios:38,
                 from ~/include/c++/9.2.0/ostream:38,
                 from ~/include/c++/9.2.0/iostream:39,
                 from test.cpp:1:
~/include/c++/9.2.0/cwchar:44:10: fatal error: wchar.h: No such file or directory
   44 | #include <wchar.h>
      |          ^~~~~~~~~

求问如何解决orz

2020/9/25 17:59
加载中...