Solved: Clion does not resolve some standard headers

Hi there,

maybe this will help somebody:

Ever since I started using Clion, it has failed to recognize a number of important standard headers (such as <random> or the one for std::shared_ptr) resulting in many warnings about unresolved code in the editor. This happens on MacOS X, with the code for the Open Source Geneva library (see launchpad.net/geneva). 

What finally solved this for me is the addition of the flag -DCMAKE_CXX_COMPILER="/usr/bin/clang" to Preferences -> Build/Execution/Deployment->CMake->Cmake options . In other words, I had to tell Clion explicitly that it should use the system compiler. My current version is 2016.1, but the problem has happened since many versions.

Hopefully this will save someone else some headache. 

Kind Regards,

Beet

Please sign in to leave a comment.