Set CC to clang++

Steven Smith steve.t.smith at gmail.com
Fri Nov 22 01:18:53 UTC 2019


Thanks. I’m just trying to hack around the error:
> Undefined symbols for architecture x86_64


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?

> On Nov 21, 2019, at 19:46, Joshua Root <jmr at macports.org> wrote:
> 
> On 2019-11-22 09:35 , Steven Smith wrote:
>> 
>> CC=/usr/bin/clang++
>> 
>> 
>> Error on the Mac: Undefined symbols for architecture x86_64 · Issue #285 · nlohmann/json
>> https://github.com/nlohmann/json/issues/285#issuecomment-348090484
> 
> Is the build system really using $CC to compile C++ code? The usual
> convention is that CC is the C compiler and CXX is the C++ compiler.
> Naturally using the wrong one will cause problems.
> 
> Sticking to the convention is greatly preferable, but if for some reason
> you really need to name a C++ compiler in CC, this will do it:
> 
> # Yuck
> configure.cc    ${configure.cxx}
> 
> - Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20191121/666081c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3898 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20191121/666081c9/attachment.bin>


More information about the macports-dev mailing list