Clion can't compile because of 「wchar.h not found」 after updated Mojave in mac.
Hello, I use Clion and I updated mojave.
I updated mojave, clion can't compile and say same error messages like below.
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/iwasakiyu/CLION/AtCoder/cmake-build-debug --target AtCoder -- -j 2
[ 50%] Building CXX object CMakeFiles/AtCoder.dir/main.cpp.o
In file included from /Users/iwasakiyu/CLION/AtCoder/main.cpp:3:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
^~~~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/AtCoder.dir/main.cpp.o] Error 1
make[2]: *** [CMakeFiles/AtCoder.dir/all] Error 2
make[1]: *** [CMakeFiles/AtCoder.dir/rule] Error 2
make: *** [AtCoder] Error 2
How should I do after this?
I tried xcode-select --install, but it didn't effect.
Thank you.
请先登录再写评论。
Could you please reload CMake project? We suppose that `Tools | CMake | Reset Cache and Reload project` should help in this case.
I had the same issue and resetting the cache didn't help in my case. I deleted the .idea folder in my project root and then imported the project using the existing cmake project.
I hava the same problem.
U can click "Tools -> CMake -> ResetCache and Reload Project" then have done.
Good Luck.
I deleted the cmake-build-debug folder, and reset the CMake Cache and Reload Project as above and that fixed the problem for me.
had the same problem, used "ResetCach and Reload Project" to fix it