Clang doesn’t see basic headers

This is because g++ is not installed, so libstdc++ is not present.

You can install g++, or if LLVM is preferred, install LLVM libc++ and specify that you want to use it, like so:

sudo apt-get install libc++-dev
clang++ -stdlib=libc++ <rest of arguments>

You may wish to link /usr/bin/c++ to the default compiler:

ln -s /usr/bin/c++ /usr/bin/clang++-libc++

and then compile simply using

$ c++ <args_as_usual>

Leave a Comment