Hi Ken, > On Jul 23, 2020, at 10:38 PM, Ken Cunningham > <ken.cunningham.web...@gmail.com> wrote: > >> 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.
Thanks for the advice. I’m having problems implementing it though. I tried setting CC like so: build.args CC="${configure.cpp} [get_canonical_archflags cc]" But it still does not work. Here is the resulting compiler used: /usr/bin/cpp -arch x86_64 -Wall -g -O2 -I/opt/X11/include -DPNG -DPNG15 -Wno-write-strings -Wno-overflow -c ascii.c Also, I don’t see clang++ in the compilers listed in https://trac.macports.org/wiki/UsingTheRightCompiler <https://trac.macports.org/wiki/UsingTheRightCompiler>. So I hacked it by using: build.args CC="/usr/bin/clang++" And it builds! But that does not seem to be the Macports way. How can I set the compiler with Macports? Thoughts? Cheers! Frank