> You have to use clang++ if you are calling in c++ includes. > > Then it will work.
Having read over the other comments, and in case that wan’t clear — if you use /usr/bin/clang++ your build will automatically find the c++ includes, and you don’t need to do any of those suggestions with -isysroot or SDKROOT or xcrun etc. It is presently failing because /usr/bin/clang does not automatically add the search path for the c++ includes, and <algorithm> is only in the c++ includes, not in the c includes. K