Clion doesn't compile on MACOS Mojave 10.14 Follow Completed Simantaturja Created September 26, 2018 12:09 After updating high sierra to mojave 10.14 , it stopped compiling and gives the following error. "xcode-select --install" is not working.
Could you please reload CMake project? We suppose that `
Tools | CMake | Reset Cache`
and reload project should help in this case.
I tried, but it didn't work.
It finally works. Just remove the command line tools by
I did all. But, I got a new problem.
@Trmasha2015, please do "xcode-select --install" in the terminal. What result do you get?
Please provide a screenshot of Preferences | Build, Execution, Deployment | Toolchains after doing "xcode-select --install".
@Trmasha2015, as you can see, CLion can't detect compilers from the command line tools. Have you performed "xcode-select --install" in the terminal? Have you tried reinstalling the command line tools?
Yes I tried. But, nothing changed
Do you have /Library/Developer/CommandLineTools/usr/bin/c++ and /Library/Developer/CommandLineTools/usr/bin/cc?
Yes I have.
As an experiment, please do the following:
1. Create a new default "C++ Executable" project in CLion.
2. Go to Preferences | Build, Execution, Deployment | Toolchains and specify /Library/Developer/CommandLineTools/usr/bin/cc and /Library/Developer/CommandLineTools/usr/bin/c++ as C and C++ compilers.
3. Do `
Tools | CMake | Reset Cache and Reload Project`.
Does CLion build this project successfully after that?
Yes. Thank you very much=)
Hello, none of the regular cpp library like #include <cmath> is being included properly
I've tried everything mentioned above. ran 'sudo -rf /Library/Developer/CommandLineTools' and 'xcode-select --install'
,reload CMake project and changed my C and Cpp compilers as indicated.
nevermind, I got it working by restarting clion again
Having the same issue after xcode removed from my system. and resting cmake cache works, thanks to Anna Filippova
Anna Filippova I'm raising this issue again.
Build #CL-201.6668.126, built on April 9, 2020
Runtime version: 11.0.6+8-b765.25 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
GC: ParNew, ConcurrentMarkSweep
I re-installed the Xcode Toolchain and reset CMake cache but still nothing helps. What I consider suspicious is that in Toolchains I manually set path to C and C++ compilers as `/Library/Developer/CommandLineTools/usr/bin/cc` and `/Library/Developer/CommandLineTools/usr/bin/c++` appropriately, but in the error output I see like `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_endian.h` making me guess that my manual setting is not important. Can you suggest something, please?
In general, I see errors like:
error: unknown type name '__builtin_constant_p'
short ntohs(const short word);