macOS Mojave에서 최근에 배포된 Xcode 최신 버전(10.2) 를 설치하고 나면,
잘 되던 Clang/Cmake에서 아래와 같은 에러가 발생하면서 작업이 진행되지 않을 수가 있다.
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd:90: /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found #include_next <wchar.h> ^~~~~~~~~ 1 error generated.
이런 경우에는 다음과 같은 절차를 수행하면 해결된다.
- 터미널을 열어서 먼저 다음 명령어를 입력한다.
이 명령어를 입력하면, 설치 도우미 창이 뜨는데 UI상에서 안내되는 대로 설치를 진행하면 된다.open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
- 1의 과정을 모두 끝마치고 나면, 아래의 명령어를 입력한다.
sudo xcode-select -s /Library/Developer/CommandLineTools
2까지의 과정을 모두 마치면 다시 정상적으로 Clang/Cmake 등을 이용할 수 있게 된다.