Set CC to clang++
Joshua Root
jmr at macports.org
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:
> https://stackoverflow.com/questions/19637164/c-linking-error-after-upgrading-to-mac-os-x-10-9-xcode-5-0-1
>
> 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:
<https://github.com/macports/macports-ports/blob/master/emulators/scummvm/Portfile#L97-L100>
- Josh
More information about the macports-dev
mailing list