前提・実現したいこと
macでvscodeを使用してc++を書こうと思ったのですが、コンパイルでwchar.hが見るから無いというエラーが出てしまいます。
拙い質問で申し訳ないですが、よろしくお願いいたします。
発生している問題・エラーメッセージ
$ g++ hello.cpp
In file included
from /usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/bits/postypes.h:40:0,
from /usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/iosfwd:40,
from /usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/ios:38,
from /usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/ostream:38,
from /usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/iostream:39,
from hello.cpp:2:
/usr/local/Cellar/gcc@5/5.5.0_2/include/c++/5.5.0/cwchar:44:19: fatal error: wchar.h: No such file or directory
compilation terminated.
試したこと
xcode-select --install
で解決したというのがありましたが、試したところ
error: command line tools are already installed, use "Software Update" to install updates
と出てしまい解決には至りませんでした。

回答3件
あなたの回答
tips
プレビュー