<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ken,<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 23, 2020, at 10:38 PM, Ken Cunningham <<a href="mailto:ken.cunningham.webuse@gmail.com" class="">ken.cunningham.webuse@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">You have to use clang++ if you are calling in c++ includes.

Then it will work.
</pre></blockquote><div class=""><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><br class=""></pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">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.</pre><pre style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">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.</pre></div></div></div></blockquote><br class=""></div><div>Thanks for the advice. I’m having  problems implementing it though. </div><div><br class=""></div><div>I tried setting CC like so:</div><div><br class=""></div><div><div><font face="Courier" class="">build.args          CC="${configure.cpp} [get_canonical_archflags cc]"</font></div><div class=""><br class=""></div><div class="">But it still does not work. Here is the resulting compiler used:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Courier" class="">/usr/bin/cpp -arch x86_64 -Wall -g -O2 -I/opt/X11/include -DPNG -DPNG15 -Wno-write-strings -Wno-overflow -c ascii.c</font></div></div><div class=""><br class=""></div><div class="">Also, I don’t see clang++ in the compilers listed in <a href="https://trac.macports.org/wiki/UsingTheRightCompiler" class="">https://trac.macports.org/wiki/UsingTheRightCompiler</a>. </div><div class=""><br class=""></div><div class="">So I hacked it by using:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">build.args          CC="/usr/bin/clang++"</font></div><div class=""><br class=""></div><div class="">And it builds! But that does not seem to be the Macports way. How can I set the compiler with Macports?</div><div class=""><br class=""></div><div class="">Thoughts?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers!</div><div class="">Frank</div><div class=""><br class=""></div></div></body></html>