LoginSignup
0
0

More than 1 year has passed since last update.

MacOS fatal error: 'wchar.h' file not foundの解消方法

Posted at

OSのUpdate後、clang++が動かなくなった

MacOSをUpdateした後、clang++がコンパイルできなくなりました。

❯ clang++ ./includes/std_vector_test.cpp
In file included from ./includes/std_vector_test.cpp:1:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/iostream:37:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/ios:214:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__locale:15:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/string:519:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/__debug:14:
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/iosfwd:98:
/usr/local/opt/llvm/bin/../include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
              ^~~~~~~~~
1 error generated.

解決方法

ここらへんのエラーはXcode周りのエラーが多いようです。

以下のコマンドで、デベロッパツールのインストールをチェックします。

xcode-select --install

インストールが開始され、問題が解決しました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0