Set CC to clang++

Joshua Root jmr at
Fri Nov 22 01:49:20 UTC 2019

On 2019-11-22 12:18 , Steven Smith wrote:
> Thanks. I’m just trying to hack around the error:
>> |Undefinedsymbols forarchitecture x86_64|

The important thing is which symbols are missing and why. Seeing the
exact link command would be useful. Can you share a build log?

> Another possible solution is:
>> add -stdlib=libstdc++ to the linking command
> See:
> I’ll try both, and go with the least-yuck one that works.
> What’s the Portfile directive to add -stdlib=libstdc++ to the linker?

We always add that to CXXFLAGS when using clang. The build system should
be using "$CXX $CXXFLAGS $LDFLAGS ..." to link C++ code, but if it isn't
and you need to add -stdlib to LDFLAGS, you can do it like this:


- Josh

More information about the macports-dev mailing list